Forum Discussion
MargotKloeck
Jul 11, 2022Copper Contributor
Formula?
Hello, In my Excel document, I use names in column C and a long number in D (which is a special code for every name and belongs to the name). In the same document I sometimes have the same names in C...
- Jul 11, 2022
MargotKloeck Perhaps you can use the method demonstrated in the attached file.
Sheet1 contains a list of names in A and a lookup formula in B2 copied down a bit. The formula expands its lookup range as you copy it down. That's your starting position as if you would start from scratch.
I copied that list to Sheet2 to demonstrate the next step.
Name01 is new so the lookup formula doesn't find it in the rows above. Hence a "-". Now, just over-write the formula with the number for Name01. Do that for every name. The next time you enter Name01 in A, the formula in B will pick it up from the rows above it, and so on.
Just make sure that you always have at least one row with the formula in B, so that you can copy it down when the name list grows.
sivakumarrj
Jul 11, 2022Brass Contributor
You can use Drop down List for Column C or D
First Need to create list of Name or Code and select the cells that you want to display
On the ribbon, click DATA > Data Validation.
In the dialog, set Allow to List.
Click in Source, Give range of Name or Code
Click OK.
for getting drop down list of Names or Codes
Next step, use Index match for getting respective code or Name
Incase you provide demo data, it would have been better to give clear idea.
First Need to create list of Name or Code and select the cells that you want to display
On the ribbon, click DATA > Data Validation.
In the dialog, set Allow to List.
Click in Source, Give range of Name or Code
Click OK.
for getting drop down list of Names or Codes
Next step, use Index match for getting respective code or Name
Incase you provide demo data, it would have been better to give clear idea.
MargotKloeck
Jul 11, 2022Copper Contributor
And how do I make the code or name in Source for getting the drop down list? Do you know this by any chance?