+ Reply to Thread
Results 1 to 9 of 9

Lookup & Return Data from Different Column

  1. #1
    Registered User
    Join Date
    04-08-2009
    Location
    Oceanside, CA
    MS-Off Ver
    Excel 2007
    Posts
    17

    Lookup & Return Data from Different Column

    I have a book with multiple tabs in it. The first is a master customer file, including customer numbers. The next two tabs include multiple references to the same customers because they list multiple shipping addresses and contacts for each customer on a separate line. I want to be able to have the additional tabs refer to the master list and find the customer name, then return the corresponding customer # in the previous column for that customer. This is what I came up with: =IF(B:B=Sheet2!B:B,Sheet1!A:A,0). But the results simply returns numbers that increase by 1. It should repeat the same customer # for the number of times that customer name is listed based on how many addresses or contacts there are. What am I not doing right?
    Last edited by TBeverson; 04-09-2009 at 06:19 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Lookup & Return Data from Different Column

    Post an example workbook with sensitive info removed?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    04-08-2009
    Location
    Oceanside, CA
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Lookup & Return Data from Different Column

    How do I add an attachment to my post? Is that possible in this forum? Or do you mean paste it here in my post.

  4. #4
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474

    Re: Lookup & Return Data from Different Column

    When you post/reply to thread, scroll down until you see 'Manage Attachments' under 'Additional Options'...

  5. #5
    Registered User
    Join Date
    04-08-2009
    Location
    Oceanside, CA
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Lookup & Return Data from Different Column

    Ok, I see it now, thanks! I attached my sample. It is truly just a sample and there is no sensitive data. Hopefully someone can tell me what I'm doing wrong. Thanks!
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474

    Re: Lookup & Return Data from Different Column

    Unclear... Can you elaborate?

  7. #7
    Registered User
    Join Date
    04-08-2009
    Location
    Oceanside, CA
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Lookup & Return Data from Different Column

    The first tab (entitled Master) within this workbook is a sample master customer record, with Column A being the customer # and Column B being the customer name. The second tab (entitled Multiple) as you can see has each sample customer name listed twice in Column B. What I want to be able to do is have Column A in the Multiple tab refer to the Master tab and find the customer name, then return the corresponding customer # in Column A from the Master tab on that same row to Column A in the Multiple tab. So Column A in the Multiple tab should list each customer # twice. How I have the function written currently, it is supposed to return a 0 only if it can't find the customer name in the Master tab. The way I have it written already is returning a customer # then just adding 1 to each subsequent one. Help!?!

  8. #8
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474

    Re: Lookup & Return Data from Different Column

    Try...

    A1, copied down:

    =LOOKUP(9.99999999999999E+307,CHOOSE({1,2},0,INDEX(master!$A$1:$A$18,MATCH(multiple!B1,master!$B$1:$B$18,0))))

  9. #9
    Registered User
    Join Date
    04-08-2009
    Location
    Oceanside, CA
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Lookup & Return Data from Different Column

    THANK YOU THANK YOU THANK YOU!!! You have no idea how much time you saved me. I am going to tell all of my friends about this site. You rock!!!

+ 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