+ Reply to Thread
Results 1 to 4 of 4

populate columns A & B based on lookup in column C

Hybrid View

  1. #1
    Registered User
    Join Date
    12-21-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    populate columns A & B based on lookup in column C

    This is a simpler example to one I had posted yesterday ... to which I didn't yet receive a response. Does this need to be merged with that other thread?

    Please see the attached. I need to perform a lookup in column C, so that values in columns A and B can be populated (based on the result of the lookup). I'm thinking it needs to be a vlookup, but I've been unable to get it to work.

    Suggestions appreciated ...
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: populate columns A & B based on lookup in column C

    Hi,

    This seems an odd layout with a mixture of data and results in the same columns. Can't this layout be simplified and the two sets of data separated. For this trivial data set the answers are as follows, but I can't help thinking your actual data is more complex than this.

    A1: =INDEX(A:A,MATCH($C1,$C:$C),1)
    B1: Copy A1 to B1

    A4: =INDEX(A:A,MATCH($C4,$C:$C,FALSE),1)
    B4: Copy A4 to B4

    Rgds
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    12-21-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: populate columns A & B based on lookup in column C

    Thanks all.

    Cutter - the data is not manually input. All the records are in the same list, but I thought a simplistic example would be best.

    Richard Buttrey - you're right ... the actual data is more extensive (there are more than 4000 records), so I think my simplistic example may not be the best. In the attached updated spreadsheet, when I copied your suggested formulas, the data did populate correctly. However, since the actual dataset has thousands of entries, I wouldn't be able to perform that number of formulas manually.

    If the data were to be in separate sheets, what would you suggest?

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    This seems an odd layout with a mixture of data and results in the same columns. Can't this layout be simplified and the two sets of data separated. For this trivial data set the answers are as follows, but I can't help thinking your actual data is more complex than this.

    A1: =INDEX(A:A,MATCH($C1,$C:$C),1)
    B1: Copy A1 to B1

    A4: =INDEX(A:A,MATCH($C4,$C:$C,FALSE),1)
    B4: Copy A4 to B4

    Rgds
    Attached Files Attached Files

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: populate columns A & B based on lookup in column C

    I have looked at your file but can't understand what you're trying to do.

    Where are the values in Col C coming from? Manual input?

    You would need a table somewhere that lists all of the states/provinces/territories with the corresponding A and B data in order to accomplish a VLOOKUP() to fill A and B on the sample sheet.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1