Using 'If Then' Statements, Excel 2010

dis_functional

New Member
Joined
Apr 17, 2013
Messages
2
Hello!

I'm trying to populate a column with data from two separate columns. To clarify, please see the table below.

The information I'm getting is placed into columns A, just a code. I have the key in a separate column, like C, with the state that code represents in column D. What I would like to do is connect the State Code I get in A with the State it represents in column D so that when I enter the next State Code in column A, B automatically fills with the correct state, ie. Nebraska in B2 and B3, and Texas in B4.

ABCD
State CodeHome StateCode Key
116115Texas
116116Nebraska
115117New York

<tbody>
</tbody>

Is this possible? I was trying to use 'If-Then' statements to do this, for example. =if(A2=C2;B2;B3)

As background, the information I'm getting is just the 'state code' and for readability I'd like to be able to show the corresponding state that code refers to without having to match it all up and enter it manually. The actual information comes out to a lot more than fifty states worth. ;)

I'd appreciate any help, as I'm not sure I'm even going in the right direction.

Thanks in advance!
 

Some videos you may like

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Watch MrExcel Video

Forum statistics

Threads
1,123,143
Messages
5,599,975
Members
414,354
Latest member
Flaxarn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top