[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2011-09-20
7
Medium Priority
?
394 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 19

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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 

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 19

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 1000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

650 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