![]() |
ping: excel experts
How do i do the following in excel?
In column B I will be entereing 2 letter state codes (NY, NJ, etc). How do I get excel to take that data and translate it to a pre-definied value and place it in another column in that row? I have 50 states and 50 numeric values... For example, if B2=NY, then G2=5 I really only know the basics with excel so i have no idea on where to start with this.... |
Set up a table with the conversion on another sheet.
Then use vlookup G2 = VLOOKUP(B2,table reference,2,FALSE) The table will have two columns. First column will be the state codes and the second column will be the numeric code for each state. |
I think a VLOOKUP function would do this efficiently.
Create a table, somewhere off to the side, with an alphabetized list of the state abbreviations, and the number you want to assign to that state. Follow the instructions for the VLOOKUP function, and this ought to work pretty easily. (You'll be putting the VLOOKUP function into cell G2 in your example above) ...er, what he said. |
If you need help with this, feel free to IM me. In fact, we could probably use Google Spreadhseets and I could show you.
|
Sample spreadsheet
Now that wade moore mentions it, I have a Google Spreadsheets account I need to activate. |
what they all said, VLOOKUP is your friend...
FM |
thanks for help on this (wade especially).
|
| All times are GMT -5. The time now is 09:07 AM. |
Powered by vBulletin Version 3.6.0
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.