Macro to add name on a cell based on the data

  • Thread starter Thread starter CAM
  • Start date Start date
C

CAM

Hello,

I am using Excel 2003 and I need help to do a macro. I copy and paste data
into a worksheet call "Table" In the worksheet I want to put a specialist
name in the column called "Specialist" beside a column called "STATE" the
specialist name will be based on what the state is. For example

If the state contains "CA" I want the specialist name to be "Anna"
or the state of "OR" I again want the specialist name to be "Anna"

Now if we get a different state "UT" I want the specialist name to be
"Cindy"

The table may have 3,000 records for one month or maybe 4,000 another month.
Table size can vary. How do I code it. Any tips or website to visit will
be appreciated. Thank you in advance.

Cheers
 
Use =VLOOKUP(). This function is well documented in Excel Help and can
return the analyst fro each state from a small table.
 
Back
Top