+ Reply to Thread
Results 1 to 5 of 5

Adding IFs to Index Match formula

  1. #1
    Registered User
    Join Date
    11-21-2016
    Location
    Leeds
    MS-Off Ver
    2016
    Posts
    6

    Adding IFs to Index Match formula

    Hi all

    I'm wanting to do an Index Match with an IF that will lookup; Column 1 if A1 = 0, Column 2 if A1 = 1, and Column 3 if A1 = 3.

    I have the current start of the formula for 2 columns:
    =INDEX(C2:E29,MATCH(CellLookupValue,B2:B29),IF(A1,2,1))

    I'm aware the IF statement at the end now will need to change, but I'm unsure how.

    A1 will either have the values 0, 1, or 2

    The table range is C2 to E29 (3 columns)
    The B column of the table is obviously for the Match and will link in to a Cell Value of my choice (which we could call A2 for now if you need an example)

    Kind regards

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Adding IFs to Index Match formula

    =INDEX(C2:E29,MATCH(CellLookupValue,B2:B29),A1+1))
    Ben Van Johnson

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Adding IFs to Index Match formula

    I presume the end of your first sentence is a typo, and it should read:

    ... if A1 = 2.

    In that case, you can use this formula:

    =INDEX(C2:E29,MATCH(A2,B2:B29,0),A1+1)

    where I've used A2 for CellLookupValue, as suggested.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    11-21-2016
    Location
    Leeds
    MS-Off Ver
    2016
    Posts
    6

    Re: Adding IFs to Index Match formula

    Brilliant stuff. Thank you both. That works a treat. And yes, Pete, that was a typo. Good spot, and nicely figured out.

    Cheers.

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Adding IFs to Index Match formula

    Glad to be able to help.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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 and adding up values
    By Matthewious2016 in forum Excel Formulas & Functions
    Replies: 26
    Last Post: 06-22-2016, 02:45 AM
  2. Adding a dimension to index-match-match
    By puzzlelover22 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-01-2014, 01:33 PM
  3. Replies: 3
    Last Post: 05-02-2013, 01:31 AM
  4. [SOLVED] Adding vlookup to Index + Match formula
    By batty87 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-14-2013, 11:07 AM
  5. Adding an If statement to an Index Match Formula
    By brandiemz101 in forum Excel General
    Replies: 3
    Last Post: 11-16-2011, 03:25 PM
  6. Adding a third match to an Index Match Formula
    By Weasel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-07-2009, 01:51 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