Using 'If Then' Statements, Excel 2010

Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Using 'If Then' Statements, Excel 2010

  1. #1
    New Member
    Join Date
    Apr 2013
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Using 'If Then' Statements, Excel 2010

     
    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.

    A B C D
    State Code Home State Code Key
    116 115 Texas
    116 116 Nebraska
    115 117 New York

    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!

  2. #2
    Board Regular Weazel's Avatar
    Join Date
    Dec 2011
    Location
    Florida
    Posts
    3,097
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Using 'If Then' Statements, Excel 2010

    you can try

    =VLOOKUP(A2,$C$2:$D$4,2,0)

    in B2

  3. #3
    New Member
    Join Date
    Apr 2013
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Using 'If Then' Statements, Excel 2010

      
    Thank you! That worked perfectly.

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com