+ Reply to Thread
Results 1 to 9 of 9

Nested if(isblank) statement

  1. #1
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Nested if(isblank) statement

    Hi everyone,

    Having some difficulty nesting three if(isblank) statements. Here's what I'm trying to do:

    if A1 = a value, then A1
    if A2 = blank (or #N/A), then A2
    if A1 and A2 = blank (or #N/A), then A3

    Any ideas?

    Thanks guys!!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Nested if(isblank) statement

    Untested, but try this...

    =if(A1<>"",A1,if(and(or(A1="",iserror(a1),A2='',iserror(a2)),A3,a2))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Nested if(isblank) statement

    Try this:

    =IF(OR(A1="",ISNA(A1)),IF(OR(A2="",ISNA(A2)),A3,A2),A1)

    Hope this helps.

    Pete

  4. #4
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Re: Nested if(isblank) statement

    hi FD and Pete,

    Thanks for the reply, guys. Unfortunately neither formula worked. I don't know if it makes a differnces, but A1, A2, and A3 are in different worksheets within the same workbook, and they are all copies of other cells in the same workbook (they contain a simple copy instead of the actual text). Does that make a difference?

    Thanks,

  5. #5
    Registered User
    Join Date
    10-21-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Nested if(isblank) statement

    Think this might work ...

    =IF(A1<>"",A1,IF(OR(ISNA(A2),A2<>""),A2,IF(AND(A1="",A2=""),A3,IF(AND(ISNA(A1),ISNA(A2)),A3))))

  6. #6
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Re: Nested if(isblank) statement

    Hi Hodpy,

    thanks for your suggestions. I'm not getting an error, but I am getting a #N/A result. Any ideas?

  7. #7
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Re: Nested if(isblank) statement

    Hey guys,

    Interestingly enough, each of your formulas work if I have the values as text in the first sheet, but since they are all copies from other sources within the workbook none of the formulas seems to want to read them, i.e, getting #N/A. Any ideas how I can get around this?

    Thanks!!

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Nested if(isblank) statement

    can you provide a sample workbook with a few sample answers?

  9. #9
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Re: Nested if(isblank) statement

    Hey guys,

    Looks like I figured it out. It was just a matter of formatting. The formula wouldn't read #N/A cells, so I changed them to show blank if there was an error and it worked. Thanks very much for all your help, everyone.

+ 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] nested If(isblank ) - at least I think that's what I need.
    By ABI_Consulting in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-09-2013, 07:22 PM
  2. [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
  3. [SOLVED] Using if and isblank nested.
    By markDuffy in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 01-29-2013, 07:49 PM
  4. Nested IF and Isblank
    By daznav in forum Excel General
    Replies: 2
    Last Post: 06-24-2010, 11:29 AM
  5. Nested ISBLANK
    By LukeD in forum Excel General
    Replies: 2
    Last Post: 01-20-2010, 07:28 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