+ Reply to Thread
Results 1 to 6 of 6

Nested IF to check blank cells

  1. #1
    Registered User
    Join Date
    05-08-2014
    MS-Off Ver
    Excel 2013
    Posts
    18

    Nested IF to check blank cells

    This seems like a simple task but I'm not sure why my nest IF formula is not working.

    Basically I have different columns with different classifications.

    I want a formula that:

    Check if cell A2 is empty, if yes retrun B2, IF B2 is empty return C2, if C2 is empty return D2.
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Nested IF to check blank cells

    Use this array formula:

    =IFERROR(INDEX(A2:D2,MATCH(FALSE,ISBLANK(A2:D2),0)),"")

    Array Formulae are a little different from ordinary formulas in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    You will know the array is active when you see curly braces { } appear around the outside of your formula. If you do not CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly braces yourself - it won't work...

    Your profile says that you are using Excel 2003. But you have attached an xlsx file (2007 and later).

    If you need Excel 2003 compatability, use this array formula instead:

    =IF(ISERROR(INDEX(A2:D2,MATCH(FALSE,ISBLANK(A2:D2),0))),"",INDEX(A2:D2,MATCH(FALSE,ISBLANK(A2:D2),0)))


    if you are using only 2007, please amend your profile.
    =IF(ISERROR(INDEX(A2:D2,MATCH(FALSE,ISBLANK(A2:D2),0))),"",INDEX(A2:D2,MATCH(FALSE,ISBLANK(A2:D2),0)))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Nested IF to check blank cells

    With your file...
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Nested IF to check blank cells

    Non-array (just ENTER) alternative:

    =IFERROR(INDEX(A2:D2,MATCH(TRUE,INDEX((A2:D2<>0),0),0)),"")

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Nested IF to check blank cells

    Forum duplicate. Ignore this post of mine.
    Last edited by Glenn Kennedy; 10-03-2016 at 03:40 AM.

  6. #6
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,913

    Re: Nested IF to check blank cells

    Or try this ...

    =IFERROR(INDEX(B2:D2,MATCH(1,(A2:C2="")*(B2:D2<>""),0)),"")

    Enter with Ctrl+Shift+Enter

+ 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 statement, checking multiple cells for Blank cells
    By JLeague in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-30-2015, 11:18 AM
  2. [SOLVED] Nested IF`s and Blank cells
    By colaps in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-13-2015, 10:11 AM
  3. [SOLVED] If formula to check blank cells
    By pauldaddyadams in forum Excel General
    Replies: 4
    Last Post: 08-06-2014, 10:07 AM
  4. Nested If statements. I wanted blank/empty cells to not show 0
    By fleetwood417 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-19-2013, 11:09 AM
  5. [SOLVED] How to check if two cells in a range of four are not blank?
    By TC1980 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-22-2013, 08:06 AM
  6. [SOLVED] Check if the cells are not blank
    By mkgoff11 in forum Excel General
    Replies: 2
    Last Post: 12-19-2012, 02:35 PM
  7. Nested IF checking non blank cells
    By brentandrews in forum Excel General
    Replies: 2
    Last Post: 12-21-2009, 10:18 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