Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Lets say I have a workbook with ID numbers in it. I have a macro
doing a lot of work on this workbook and one of the things I want it to do is to convert the ID numbers into names. I haven't done this with VB before and was wondering what the best/easiest way to do this would be? If I wasn't doing it with a macro, I would just have a vlookup, but this isn't an option for my case. I have looked into arrays, but this seems like it would be hard to populate and search thru. My idea was to create two arrays: IDs = Array (1111,2222,3333,4444) Names = Array("Bob","John","Henry","Sue") The real data would contain about 20 elements. I would rarely if ever need to add or change IDs/Names. Then as I find the ID value in the cell, it would look thru the ID array, find the index of the value, the pull up the corresponding index in the names array. This seems cumbersome and I am sure there has to be a better way to do this. Thanks, Andrew V. Romero |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Matching Names | Excel Discussion (Misc queries) | |||
Matching Names | New Users to Excel | |||
Matching names | Excel Discussion (Misc queries) | |||
Matching names in two columns | Excel Discussion (Misc queries) | |||
Sorting and matching rows of names with Socials with master list and eliminating the extra names | Excel Worksheet Functions |