ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   I want a name in one spot and it's code in another (https://www.excelbanter.com/excel-discussion-misc-queries/18099-i-want-name-one-spot-its-code-another.html)

TwoWheelDemon

I want a name in one spot and it's code in another
 
I am using Excel, I am using drop down list, when I choose a name from a drop
down list I want the cooresponding code to go into another column. Without
using If then else, can I make excel do this

JulieD

Hi

you can use a VLOOKUP function or worksheet_Change code

with the VLOOKUP you have your names and the corresponding codes somewhere
else in the workbook and then when the name is selected the VLOOKUP will
return the appropriate codes - check out help

with a worksheet_change code you basically type an IF THEN ELSE statement
(or SELECT CASE) into VBA with the names & codes - this, IMHO is more
difficult to maintain in the long run.

if you'ld like more assistance on either of these methods please post back

Cheers
JulieD

"TwoWheelDemon" wrote in message
...
I am using Excel, I am using drop down list, when I choose a name from a
drop
down list I want the cooresponding code to go into another column. Without
using If then else, can I make excel do this





All times are GMT +1. The time now is 06:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com