+ Reply to Thread
Results 1 to 7 of 7

Nested IF(Match) Giving N/A error

  1. #1
    Registered User
    Join Date
    12-11-2015
    Location
    457
    MS-Off Ver
    2013
    Posts
    3

    Nested IF(Match) Giving N/A error

    Hey everyone, I've done extensive looking on this and can't seem to find what I'm looking for. I think the answer might be in "IFERROR", but I can't seem to get this doing what I want it to do. Hoping someone has a quick answer.

    A | B | C | D |
    Sunroof | NAV | Bose | Rear CAMERA

    Currently my formula is =IF(MATCH("*Camera",A2:D2,0),"Rearview Camera","No Rearview Camera")

    This is returning a value of "Rearview Camera" in the cell.

    But what I want it to do is this: If there is no Camera, then I want it to return the sunroof. So I tried the following nested if statement, but it's generating "N/A"

    A | B | C | D |
    Sunroof | NAV | Bose | 16" Wheels
    =IF(MATCH("*Cam",A2:D2,0),"Rearview Camera",(IF(MATCH(sunroof,A2:D2,0),"Sunroof","No Features Found")))

    It's generating a "Value Not Available" Error

    Any thoughts? Help would be greatly appreciated.

  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,739

    Re: Nested IF(Match) Giving N/A error

    i have not checked the full syntax
    but at first sight

    =IF(MATCH("*Cam",A2:D2,0),"Rearview Camera",(IF(MATCH(sunroof,A2:D2,0),"Sunroof","No Features Found")))

    you need an * after CAM
    =IF(MATCH("*Cam*",A2:D2,0),"Rearview Camera",(IF(MATCH("sunroof",A2:D2,0),"Sunroof","No Features Found")))
    so that it can find the word camera
    and inverted commas for sunroof

    BUT if it cannot find camera - it will return #N/A

    Try using

    =IF(COUNTIF(A2:D2,"*Cam*"),"Rearview Camera",(IF(COUNTIF(A2:D2,"*sunroof*"),"Sunroof","No Features Found")))

    BUT what happens if you have BOTH
    Last edited by etaf; 03-09-2016 at 06:34 PM.
    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
    Registered User
    Join Date
    12-11-2015
    Location
    457
    MS-Off Ver
    2013
    Posts
    3

    Re: Nested IF(Match) Giving N/A error

    Ok, so I fixed the *, but I'm still getting N/A error.
    I don't want it to return N/A, I want it to return Sunroof.

    Ideally what I want is to to prioritize.

    If it finds a camera - return camera
    If it doesn't, then return sunroof,
    etc...

  4. #4
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: Nested IF(Match) Giving N/A error

    maybe
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: Nested IF(Match) Giving N/A error

    woops looks like you put random spaces in so you will need the second *

    Please Login or Register  to view this content.

  6. #6
    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,739

    Re: Nested IF(Match) Giving N/A error

    did you try the countif ?

  7. #7
    Registered User
    Join Date
    12-11-2015
    Location
    457
    MS-Off Ver
    2013
    Posts
    3

    Re: Nested IF(Match) Giving N/A error

    @scottiex - you sir are a genius! thanks so much for your help,.

+ 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. Replies: 5
    Last Post: 01-30-2015, 06:39 PM
  2. [SOLVED] WorksheetFunction.Match giving error
    By Taemex in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-03-2015, 10:49 PM
  3. [SOLVED] Index, Match and Indirect giving REF error
    By stanleds in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-15-2013, 06:08 AM
  4. [SOLVED] Three questions starting with Index, Match giving #REF! error
    By JO505 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-02-2013, 07:42 PM
  5. Nested Index Match Error
    By cyclops755 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-13-2012, 01:26 AM
  6. [SOLVED] Range error in code, runs alone but not inside my full program, giving runtime error 1004
    By charizzardd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-23-2012, 03:34 PM
  7. worksheetfunction.match giving run time error '1004'
    By devo2511 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-15-2010, 04:47 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