+ Reply to Thread
Results 1 to 9 of 9

IF Statement Comparing 2 ISNA Statements

  1. #1
    Registered User
    Join Date
    08-20-2006
    Location
    USA
    MS-Off Ver
    MS Office 2010
    Posts
    37

    IF Statement Comparing 2 ISNA Statements

    Hello!
    I'll make this question short and sweet!

    In N10 I have this:
    Please Login or Register  to view this content.
    S24 is referencing a VLOOKUP that is determined by the drop-down choice in L10. Now, depending on what is chosen elsewhere, the choice in L10 needs to produce different results, which is reflected in S42.
    All I want to do is produce an IF statement displaying the results of S24 OR S42, depending on which one is NOT displaying N/A.

    Is this possible?

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: IF Statement Comparing 2 ISNA Statements

    What if BOTH cells are not displaying #N/A?

    What type of data does the lookup formula return? Is it text? Numeric? Could be either? Something else?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: IF Statement Comparing 2 ISNA Statements

    Try

    =IF(ISNA(S24),IF(ISNA(S42),"Both NA",S42),S24)

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: IF Statement Comparing 2 ISNA Statements

    Here's how I would do it assuming the lookup formulas return a TEXT value...

    =IF(ISTEXT(S24),S24,IF(ISTEXT(S42),S42,""))

  5. #5
    Registered User
    Join Date
    08-20-2006
    Location
    USA
    MS-Off Ver
    MS Office 2010
    Posts
    37

    Re: IF Statement Comparing 2 ISNA Statements

    Thanks so much for the quick responses!
    What if BOTH cells are not displaying #N/A?

    What type of data does the lookup formula return? Is it text? Numeric? Could be either? Something else?
    Both cannot display #N/A, I have prevented that. They are numeric (dollar) values only. I'll give a brief example of what I'm trying to do.
    In L10 there is a drop down of various data usages (300MB,2GB,4GB,etc). If I choose 2GB then S24 (which is in a hidden column) will calculate $60. HOWEVER, if K24 or K25 has a certain option chosen THEN S24 goes blank due to this:
    =IF(OR(K25="CD Only",K24="Tablet Only"),"",VLOOKUP(L10,$R$2:$S$17,2,FALSE))
    Once that goes blank, S42 is now active:
    =IF(OR(K25="CD Only",K24="Tablet Only"),VLOOKUP(L10,$R$27:$S$40,2,FALSE),"")
    If I choose "Tablet Only" in K25, 2GB now is worth $20, and S42 will reflect that.
    I want N10 to show whichever cell has a value. If one is N/A and the other is blank (i.e. nothing chosen from L10) then N10 remains blank.

    =IF(ISNA(S24),IF(ISNA(S42),"Both NA",S42),S24)
    Unfortunately this doesn't show me anything if S42 is the active cell.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: IF Statement Comparing 2 ISNA Statements

    They are numeric (dollar) values only.
    OK, try this...

    =IF(COUNT(S24),S24,IF(COUNT(S42),S42,""))

  7. #7
    Registered User
    Join Date
    08-20-2006
    Location
    USA
    MS-Off Ver
    MS Office 2010
    Posts
    37

    Re: IF Statement Comparing 2 ISNA Statements

    YES!
    That was exactly what I needed, thank you so much Tony!

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: IF Statement Comparing 2 ISNA Statements

    Try

    =LOOKUP(9.99999999999999E+307,CHOOSE({1,2},S24,S42))

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: IF Statement Comparing 2 ISNA Statements

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ 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. Nested IF(ISNA) Statements - Multiple Sheets
    By Cher2332 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-18-2013, 12:47 PM
  2. [SOLVED] using isblank and isna in one statement
    By cherryt in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-14-2013, 04:44 AM
  3. Adding ISNA to long nested IF statements with vlookups
    By vgately99 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-07-2013, 02:59 PM
  4. [SOLVED] Nested If Statement - ISBLANK and ISNA in same statement?
    By Janc in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-23-2013, 09:00 AM
  5. IF(ISNA(IF(AND Statement
    By freybe06 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-21-2011, 11:38 AM

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