+ Reply to Thread
Results 1 to 6 of 6

Nested If Formula with Match Function

  1. #1
    Registered User
    Join Date
    12-27-2013
    Location
    Irving, Texas
    MS-Off Ver
    Excel 2013
    Posts
    42

    Nested If Formula with Match Function

    Fruits And Veg.xlsx

    Hi All,
    I'm trying to create a check within a workbook. Basically, the formula should match the value in column A to either the values listed in column H or I. In the even that there is a match, I need it to return the name of the column. I've attached a workbook with what I've got so far.

    Please let me know if I can provide any additional details.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,740

    Re: Nested If Formula with Match Function

    match will be returning an error - NOT true or false
    try
    =IF(COUNTIF(H:H,A2)>0,"Fruit",IF(COUNTIF(I:I,A2)>0,"Veg",""))
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Nested If Formula with Match Function

    Give this formula a try =IF(NOT(ISERROR(MATCH(A2,$H$2:$H$4,0))), $H$1,IF(ISERROR(MATCH(A2,$I$2:$I$4,0)),"",$I$1))

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,620

    Re: Nested If Formula with Match Function

    If for some reason you would like to stick to MATCH then this shall work fine:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    but of course COUNTIF is more natural
    Best Regards,

    Kaper

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Nested If Formula with Match Function

    Or this

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  6. #6
    Registered User
    Join Date
    12-27-2013
    Location
    Irving, Texas
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Nested If Formula with Match Function

    Awesome! I ended up going with the =IF(COUNTIF(H:H,A2)>0,"Fruit",IF(COUNTIF(I:I,A2)>0,"Veg","")) formula. It worked out perfectly once I tweaked it to fit my live data.
    Thanks guys! I appreciate the quick turn-around!
    You guys rock!

+ 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 with Nested Match Function Help
    By T86157 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-30-2015, 12:43 PM
  2. [SOLVED] Help Requested with Nested Small Function Inside Index/Match Formula
    By trandle in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-26-2015, 10:07 AM
  3. nested MATCH function within the INDEX function
    By thechoosenonesdream in forum Excel General
    Replies: 4
    Last Post: 10-25-2012, 03:55 PM
  4. Nested Match(index()) vs. Match() array formula.
    By GeneralDisarray in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-14-2011, 07:57 AM
  5. Match function nested in an If statement
    By dforte in forum Excel General
    Replies: 15
    Last Post: 12-09-2009, 12:52 PM
  6. Nested Function using MATCH and/or INDEX
    By ExcelJunkie in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-26-2006, 03:54 PM
  7. [SOLVED] Offset function with nested match function not finding host ss.
    By MKunert in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-21-2006, 06:50 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