+ Reply to Thread
Results 1 to 7 of 7

INDEX Formula to pick up one or other column

  1. #1
    Registered User
    Join Date
    01-26-2016
    Location
    TX
    MS-Off Ver
    Excel 2016
    Posts
    99

    INDEX Formula to pick up one or other column

    All,

    I am trying to use the index function to pick up results from one column or another. If column 8 is blank, then use column 4. But even though column 8 is blank my formula returns a "0". In addition, if the reference # is not in the first sheet, I need blanks "" instead of #N/A.

    Currently my Formula is:

    =IFERROR(INDEX(Sheet1!$1:$1048576,MATCH(Sheet2!A3,Sheet1!A:A,0),8),INDEX(Sheet1!$1:$1048576,MATCH(Sheet2!A3,Sheet1!A:A,0),4)).

    I've attached a sheet with desired results. Any help I could get is appreciated!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: INDEX Formula to pick up one or other column

    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: INDEX Formula to pick up one or other column

    Try this instead:

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,099

    Re: INDEX Formula to pick up one or other column

    or indeed:

    =IFERROR(IF(INDEX(Sheet1!H:H,MATCH(A3,Sheet1!A:A,0))=0,INDEX(Sheet1!D:D,MATCH(A3,Sheet1!A:A,0)),INDEX(Sheet1!H:H,MATCH(A3,Sheet1!A:A,0))),"")
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,174

    Re: INDEX Formula to pick up one or other column

    This is because the lookup value matches in the first lookup, so it never moves on to the second.

    What is the name of the column that you are referring to as 4? To me (and Excel), that's the OWNER column - is this what's intended?

    It's very bad practice to use an entire worksheet range in a lookup.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    01-26-2016
    Location
    TX
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: INDEX Formula to pick up one or other column

    Thank you all so much for the help! All three suggestions worked perfectly.

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: INDEX Formula to pick up one or other column

    Glad to help & thanks for the feedback.

+ 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] Index/Match formula does not pick the correct records across lookup table
    By skydivetom in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-31-2020, 07:10 AM
  2. [SOLVED] Index & Match to pick out 'all' the data values in a 'specified" column of data
    By david2020 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-11-2020, 06:49 AM
  3. Formula to compare two column and pick the output
    By Andy308 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-09-2020, 10:40 PM
  4. Replies: 3
    Last Post: 12-08-2016, 10:37 AM
  5. [SOLVED] Formula to pick data from a column then a row help :)
    By enagli in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-27-2014, 03:01 PM
  6. Pick diff pick list as per column value
    By ROHAN999 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 11-10-2013, 12:10 PM
  7. Formula to pick last value in a column
    By jayschr in forum Excel General
    Replies: 6
    Last Post: 03-23-2009, 02: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