+ Reply to Thread
Results 1 to 12 of 12

Returning Yes, No, or #N/A when certain conditions are met

  1. #1
    Registered User
    Join Date
    03-18-2008
    Posts
    9

    Returning Yes, No, or #N/A when certain conditions are met

    I came across another situation that I was hoping you could help me with. It's another look up match problem. The layout has 3 columns Person, Form, Location and Yes/No. I'm looking to see if the criteria is met the formula will return Yes No or #n/a

    Person Form Location Yes/No
    Steve C-20 USA
    Steve C-19 USA
    Steve C-28 USA
    Steve C-30 USA
    Steve C-22 USA
    Steve C-23 USA Yes
    Steve B-100 Brazil
    Steve C-55 Brazil No
    Jill C-22 Japan
    Frank P-01 Mexico
    Frank P-23 Mexico
    Frank P-15 Mexico
    Frank P-16 Mexico
    Frank P-12 Mexico No
    Frank P-01 German
    Frank P-16 German
    Frank P-15 German No
    Frank P-08 German
    Frank P-33 German

    So if I'm looking for Steve, C-23, USA, Yes I want it to return Yes
    So if I'm looking for Frank, P-15, German, No I want it to return No
    So if I'm looking for Frank, P-33, German, blank I want it to return #N/A
    Last edited by tkdlance; 09-18-2014 at 02:55 PM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Returning Yes, No, or #N/A when certain conditions are met

    Try

    =IF(COUNTIFS(A2,"Steve",B2,"C-23",C2,"USA") = 1,"Yes",IF(COUNTIFS(A2,"Frank",B2,"P-15",C2,"German") = 1,"No",IF(COUNTIFS(A2,"Frank",B2,"P-33",C2,"German") = 1,NA())))

    in D2 and copy down.

  3. #3
    Registered User
    Join Date
    03-18-2008
    Posts
    9

    Re: Returning Yes, No, or #N/A when certain conditions are met

    I'm looking for Yes or No or blank that is already there.

    So if I'm looking for Steve, C-23, USA, Yes .... I want it to return Yes
    So if I'm looking for Frank, P-15, German, No ... I want it to return No
    So if I'm looking for Frank, P-33, German, blank ... I want it to return #N/A

    Sorry I was just looking at this and it was a little confusing on what I was asking about.
    Last edited by tkdlance; 09-18-2014 at 02:55 PM.

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Returning Yes, No, or #N/A when certain conditions are met

    OK - create a helper column with the three fields concatenated and use this for your look up.

  5. #5
    Registered User
    Join Date
    03-18-2008
    Posts
    9

    Re: Returning Yes, No, or #N/A when certain conditions are met

    if I do a Concatenate it would have to be a nested If Statement..

    =IF(CONCATENATE(A17,B17,C17,D17)="SteveC-23USAYes","yes",IF(CONCATENATE(A17,B17,C17,D17)="SteveC-23USANo","No","#N/A"))

  6. #6
    Registered User
    Join Date
    03-18-2008
    Posts
    9

    Re: Returning Yes, No, or #N/A when certain conditions are met

    If I do a Concatenate it would have to be a nested If Statement..

    =IF(CONCATENATE(A17,B17,C17,D17)="SteveC-23USAYes","yes",IF(CONCATENATE(A17,B17,C17,D17)="SteveC-23USANo","No","#N/A"))

    My only issue is the workbook that I'm working on is looking up the Data in another workbook that I can't add an extra column to.

  7. #7
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Returning Yes, No, or #N/A when certain conditions are met

    I count a minimum of 3*17*5*3 = 765 combinations of data.

    How do you want to handle the (765 - 3) / 765 = 99.6% of possibilities you haven't explicitly stated?

  8. #8
    Valued Forum Contributor
    Join Date
    10-10-2012
    Location
    New York
    MS-Off Ver
    Excel 2007/2010
    Posts
    337

    Re: Returning Yes, No, or #N/A when certain conditions are met

    Assuming the table you're referencing starts at cell A1 (including the column headers) and you're using reference cells for the three variables (Person, Form, Location) in the workbook you're placing the formula in, you can try this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Don't just use the answers provided for you. Try to understand how it works by reverse engineering or asking about it.

    Please mark the thread as [SOLVED] (Thread Tools->Mark thread as Solved) when answered.
    If you're happy with an answer given, please click the * under the person's name to boost their reputation.

  9. #9
    Registered User
    Join Date
    03-18-2008
    Posts
    9

    Re: Returning Yes, No, or #N/A when certain conditions are met

    This is only a sample of the Data that I'm working with. There are over 10,000 names and for each name there are 200 Forms, with locations all over the world. Some have Yes some have No and some aren't filled in at all. So I'm just trying to find out if the person has looked at or filled out certain forms.

  10. #10
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Returning Yes, No, or #N/A when certain conditions are met

    make listbox dropdowns for your search

    in F1, G1, H1

    untested, but[B]
    =THISFORMULA(Didn't work)


    see below post
    Last edited by Speshul; 09-18-2014 at 04:43 PM.
    You should hit F5, because chances are I've edited this post at least 5 times.
    Example of Array Formulas
    Quote Originally Posted by Jacc View Post
    Sorry, your description makes no sense. I just made some formula that looks interesting cause I had nothing else to do.
    Click the * below on any post that helped you.

  11. #11
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Returning Yes, No, or #N/A when certain conditions are met

    Here I tested this one, this works.

    Use Control + Shift + Enter to enter this Array Formula
    =INDEX(D1:D13,MATCH(F1&G1&H1,A1:A13&B1:B13&C1:C13,0)))


    Use F1, G1, and H1 as the three fields to look for.


    Note, if you have duplicates in there (three fields are identical in more than one row) it will return the first one it finds.

    Adjust the size as needed obviously, i only tested on 13 rows. For luck.
    Last edited by Speshul; 09-18-2014 at 04:37 PM.

  12. #12
    Registered User
    Join Date
    03-18-2008
    Posts
    9

    Re: Returning Yes, No, or #N/A when certain conditions are met

    So I tried the Formula and it didn't work.

    I've attached a file with an example of how it should work.
    Attached Files Attached Files

+ 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. Returning a value if multiple conditions are met.
    By supguy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-25-2013, 02:00 PM
  2. [SOLVED] Returning desired number on conditions
    By Montoro22 in forum Excel General
    Replies: 15
    Last Post: 08-02-2012, 02:25 PM
  3. 3 conditions returning 1 result
    By DebBagby in forum Excel General
    Replies: 4
    Last Post: 01-05-2012, 04:54 PM
  4. Returning a Value if 3 Conditions are True
    By brownie224 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-11-2006, 07:00 PM
  5. returning a count if two conditions are met
    By davmason in forum Excel Formulas & Functions
    Replies: 53
    Last Post: 09-06-2005, 03:05 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