Link to home
Start Free TrialLog in
Avatar of inspironcrk
inspironcrkFlag for Greece

asked on

Excel or Access, to automatically fill value based on previous entered data

Hello.
I would like to do the following:
I have a list of values in a column of a table (Column Name: CODES). I must manually enter the correct correspondent code in a second comumn (Column Name: KEN).
After that I would like whenever I add a value in CODES (manually or as an import from another list), to have Excel or Access to automatically fill in the correct correspondent value in KEN column if there is one previously added.

Any answer is welcome.
Regards
 
 
 KEN.xls KEN.xls
Avatar of Richard Daneke
Richard Daneke
Flag of United States of America image

In Access, your table field Ken can be a combo box with a query that looks for distinct rows of Ken and Codes with the Codes feld as the filter criteria.   This will return any Ken values entered for a specific Code.
See attached db
Database41.accdb
You could set the KEN column to be a lookup of the CODE in the cells above, use a mixture of absolute and relative row references to define the cells above, top row would be absolute, row immediately above would be relative and would therefore move as the formula is copied down.

The user would then only have to input the KEN value for the first occurence of the CODE, overwriting the formula in doing so.

Thanks
Rob H
Avatar of inspironcrk

ASKER

@ DoDahD: I will try it right now

@robhenson: Can you be more specific? I am very rookie in coding...

Thank you
@ DoDahD:

Thanks for the effort. I have the following remarks: Because there will be one to one relationship between the cells, I would like the program to automatically add the correct correspondent value if there is one.

As for the form is not the optimal way to enter the CODES, since I will import them from other tables.

Is it clear?

Regards,
Niktias
since I will import them from other tables:   You can use an update query to fill the Ken values if you only have one Ken value for each Code.
ASKER CERTIFIED SOLUTION
Avatar of Rob Henson
Rob Henson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you all. I prefer the excel answer since it is easier for me to handle.