LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Matching IDs with Names (VB)

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Matching Names Mal Excel Discussion (Misc queries) 7 January 4th 12 12:45 PM
Matching Names Tarig New Users to Excel 1 November 8th 09 01:13 PM
Matching names Richard Excel Discussion (Misc queries) 1 April 24th 07 11:50 PM
Matching names in two columns [email protected] Excel Discussion (Misc queries) 2 March 29th 07 05:01 AM
Sorting and matching rows of names with Socials with master list and eliminating the extra names Giacomo Excel Worksheet Functions 1 March 10th 07 01:52 AM


All times are GMT +1. The time now is 06:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"