Solved

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

Posted on 2011-09-20
7
388 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:inspironcrk
  • 3
  • 2
  • 2
7 Comments
 
LVL 18

Expert Comment

by:Richard Daneke
ID: 36566222
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
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 36566339
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
0
 

Author Comment

by:inspironcrk
ID: 36566659
@ DoDahD: I will try it right now

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

Thank you
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

Author Comment

by:inspironcrk
ID: 36566695
@ 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
0
 
LVL 18

Expert Comment

by:Richard Daneke
ID: 36566758
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.
0
 
LVL 33

Accepted Solution

by:
Rob Henson earned 250 total points
ID: 36566826
See attached on List2.

I have put formula in column C from row 9 downwards.

You will see that the formula in rows 9 & 11 pull the relevant KEN value from the cells above.

Whereas, the formulaw in rows 10 & 12 give a #N/A error value because they are the first occurence. For the first occurence of a code, type the KEN code in manually and then future occurences in the list will be populated by the formula.

This could be done with a VBA routine instead if so required, checking for input in column B and checking for previous occurences of the code, populating column C accordingly or requesting a code for a new occurence.

Hope this helps.
Rob H KEN.xls
0
 

Author Closing Comment

by:inspironcrk
ID: 36566881
Thank you all. I prefer the excel answer since it is easier for me to handle.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question