+ Reply to Thread
Results 1 to 12 of 12

IF formula with INDEX and MATCH that doesn't work

  1. #1
    Registered User
    Join Date
    12-03-2024
    Location
    Taiwan
    MS-Off Ver
    Office 2019
    Posts
    4

    Question IF formula with INDEX and MATCH that doesn't work

    Dear all,

    I'm using the forum for the first time.
    I've always looked for answers to my excel problems on various websites, but I cannot find the specific problem that I have.

    Here's the link to the file:
    FOLLOW-UP - test.xlsx

    In this file, there are 2 worsheets:
    - worksheet "國家" for countries (in Chinese) - with 2 "countries" columns (with the full name, and with the abbreviations of the countries "UAE", "USA", "UK")
    - worksheet "test" on which the "region" column should return the region information from the first worksheet according to the given "country".
    The formula is not working when it needs to match information from the second column, it doesn't return the corresponding "region".

    Thanks in advance for your attention!

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,691

    Re: IF formula with INDEX and MATCH that doesn't work

    the cells in col E are formatted as text, you have to change them to general to get them to work.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,691

    Re: IF formula with INDEX and MATCH that doesn't work

    don't know what the answers are supposed to be but here is your workbook back with corrected cell formatting in col E and answers(?).
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-03-2024
    Location
    Taiwan
    MS-Off Ver
    Office 2019
    Posts
    4

    Re: IF formula with INDEX and MATCH that doesn't work

    Thank you so much for your swift answer!
    My issue was on the "region" B colum, where it returns a "N/A" to me. The D column is for you to see the difference between the different formulas I used.
    I would like to use a formula I can copy across the whole workbook.

    I've replaced the Chinese with English.
    FOLLOW-UP - test.xlsx

    Here are the formulas:
    1 Europe Romania =IF(MATCH(C4,Countries!B:B),INDEX(Countries!A:A,MATCH(C4,Countries!B:B,0)),INDEX(Countries!A:A,MATCH(C4,Countries!F:F,0)))
    2 Europe Spain =IFS(MATCH(C5,Countries!B:B),INDEX(Countries!A:A,MATCH(C5,Countries!B:B,0)),MATCH(C5,Countries!F:F),INDEX(Countries!A:A,MATCH(C5,Countries!F:F,0)))
    3 Europe UK =IF(MATCH(C6,Countries!F:F),INDEX(Countries!A:A,MATCH(C6,Countries!F:F,0)))
    4 #N/A UAE =IF(MATCH(C7,Countries!B:B),INDEX(Countries!A:A,MATCH(C7,Countries!B:B,0)),INDEX(Countries!A:A,MATCH(C7,Countries!F:F,0)))
    5 #N/A USA =IFS(MATCH(C8,Countries!B:B),INDEX(Countries!A:A,MATCH(C8,Countries!B:B,0)),MATCH(C8,Countries!F:F),INDEX(Countries!A:A,MATCH(C8,Countries!F:F,0)))

    1.2.3. are working, because they are matching only one element.
    I cannot use 3.: it will only work for the 3 countries in column F ("UAE", "USA", "UK).
    That's why I need 1. and 2. to work, no matter which column is the reference.

  5. #5
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,998

    Re: IF formula with INDEX and MATCH that doesn't work

    TEST

    B4=IFERROR(IF(ISNUMBER(MATCH(C4,Countries!B:B,0)),INDEX(Countries!A:A,MATCH(C4,Countries!B:B,0)),INDEX(Countries!A:A,MATCH(C4,Countries!F:F,0))),"")

    Copy down

  6. #6
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,929

    Re: IF formula with INDEX and MATCH that doesn't work

    Another way,
    B4
    Please Login or Register  to view this content.
    copy down.

  7. #7
    Registered User
    Join Date
    12-03-2024
    Location
    Taiwan
    MS-Off Ver
    Office 2019
    Posts
    4

    Re: IF formula with INDEX and MATCH that doesn't work

    Hi! Thank you both of you for your answer.
    Unfortunately, it seems to not be working either.

    Please Login or Register  to view this content.
    => Returns a blank case

    Please Login or Register  to view this content.
    => Returns #N/A, even in cases that used to work.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,489

    Re: IF formula with INDEX and MATCH that doesn't work

    Try this, copied down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  9. #9
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,929

    Re: IF formula with INDEX and MATCH that doesn't work

    Upload a sample file with error message and mock-up results.

  10. #10
    Registered User
    Join Date
    12-03-2024
    Location
    Taiwan
    MS-Off Ver
    Office 2019
    Posts
    4

    Re: IF formula with INDEX and MATCH that doesn't work

    Hi again!
    I wanted to say that all your options ARE working!
    I realized just now that the "Countries" worksheet in the original file is in Chinese, forgot to change it in the formula...

    Again, I apologize for misleading all of you ^^"
    And I thank you so much for your help!!!

  11. #11
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,929

    Re: IF formula with INDEX and MATCH that doesn't work

    You are welcome.
    --------------------------------------
    If that takes care of your original question, please click on "Thread Tools" from the menu link above and mark this thread as SOLVED.

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,489

    Re: IF formula with INDEX and MATCH that doesn't work

    You're welcome. Thanks for the rep.

+ 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 doesn't work
    By kf1511 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-22-2021, 12:37 PM
  2. [SOLVED] INDEX & MATCH Formula Doesn't Work
    By zanshin777 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-25-2020, 02:51 PM
  3. INDEX MATCH MATCH doesn't work well in a Filtered List?
    By exceln3wb in forum Excel General
    Replies: 1
    Last Post: 10-05-2017, 06:57 AM
  4. Match Index Doesn't Work
    By benjie1984 in forum Excel General
    Replies: 3
    Last Post: 03-02-2017, 04:32 PM
  5. function INDEX MATCH MATCH doesn´t work
    By leonelcd in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-31-2015, 11:36 AM
  6. Index + Match doesn't work with text
    By blueturnaround in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-19-2014, 01:18 PM
  7. Index Match Match Formula DOESN'T WORK WITH TABLES/TABLE NAMES ??
    By Underling in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-04-2014, 09:01 PM

Tags for this Thread

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