+ Reply to Thread
Results 1 to 9 of 9

index match two two different columns

  1. #1
    Registered User
    Join Date
    05-03-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    51

    index match two two different columns

    I'm using index match but I'm trying to pull data from a cell but the look up values are in two different columns. Im trying to get it to look at one column first if they have text in it then use that data to look up the data thats needs to be matched if not then use data in a separate column. now the data in the first column that i want it to lookout is being supplied through a formula also.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: index match two two different columns

    Unclear. Please post a sample workbook that demonstrates data and the shows the kind of "match" you're trying to describe.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    05-03-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    51

    Re: index match two two different columns

    sorry for it being unclear but i included a simple sheet that shows it. The formula would be in the G column, I'm trying to get it grab the # from the first table that is in column C and match it to the second table. i want it to first look in column F if they have data there use that as the reference to match to column B, if there is no data then use the data in column E as the reference data. I hope this clears things up a little bit.
    Attached Files Attached Files

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: index match two two different columns

    Is your sample in error on the 3rd and 4th items?

    One formula that will work in C2, then copied down is:

    =IFERROR(VLOOKUP(B2,$E:$G,3, 0), VLOOKUP(B2,$F:$G, 2, 0))
    Last edited by JBeaucaire; 01-26-2016 at 11:16 PM.

  5. #5
    Registered User
    Join Date
    05-03-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    51

    Re: index match two two different columns

    i might have explained it backwards. I would want the formula to be in Column G and to grab the number from column C. So it would look at Column f to find a match in column B if their is no match it would look at column E to find the match in Column B. But also if Column F is empty it would just go to column E to find a match in Column B. Sorry i know it is a lil confusing and i didn't explain it the best.

  6. #6
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: index match two two different columns

    Try

    G2=IFERROR(VLOOKUP(E2,B:C,2,FALSE),VLOOKUP(F2,B:C,2,FALSE))

    Or

    G2=IFERROR(INDEX(C:C,MATCH(E2,B:B,0)),INDEX(C:C,MATCH(F2,B:B,0)))

    Drag down as required.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: index match two two different columns

    In t case, as Ankur has noted, the formula could be:

    =IFERROR(VLOOKUP(E2,B:C, 2, 0), VLOOKUP(F2,B:C, 2, 0))


    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  8. #8
    Registered User
    Join Date
    05-03-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    51

    Re: index match two two different columns

    Ankur,
    those formulas look great and are what I'm trying to do thanks a ton.

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: index match two two different columns

    Withdrawn by FR.
    Last edited by FlameRetired; 01-27-2016 at 03:22 PM.
    Dave

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Cross Check Columns for Index Match Match
    By Harr in forum Excel Formulas & Functions
    Replies: 25
    Last Post: 12-31-2015, 11:35 AM
  2. [SOLVED] Using Index & Match (or similar) to check two columns for a match
    By dvs in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-30-2015, 07:07 PM
  3. Index/Match but the second match criteria >0 regarding 3 columns
    By Ben2487 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-29-2014, 12:08 PM
  4. [SOLVED] Match Issue - Consolidate Columns of Data With Match/Index/etc?
    By excelsior123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-03-2014, 05:14 PM
  5. Increment columns in INDEX and MATCH formula - ROWS and COLUMNS
    By nickmangan in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2012, 10:38 AM
  6. Index Match on two columns
    By Huddle in forum Excel General
    Replies: 13
    Last Post: 06-09-2011, 03:19 PM
  7. [SOLVED] Index/Match for 2 columns?
    By Miss Spaghetti in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-02-2005, 04:07 PM

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