+ Reply to Thread
Results 1 to 4 of 4

How to not include blank cells in an IF function

  1. #1
    Registered User
    Join Date
    04-14-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    12

    How to not include blank cells in an IF function

    Hi all,

    I'm stuck and I hope you can help.
    If have very simple =IF function, =IF(F4=H4;1;0) but don't wan't the 'value is true' value when both cells are empty, how do I need to change the function so it states 0?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to not include blank cells in an IF function

    Hi, and welcome to the forum,

    One way (probably of several)

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

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

    Re: How to not include blank cells in an IF function

    Nest an AND inside there to check for two outcomes.

    Please Login or Register  to view this content.
    BTW it looks like you can just return a boolean response, so you could actually drop the IF entirely and just do the logic.

    Please Login or Register  to view this content.
    Like that.

  4. #4
    Registered User
    Join Date
    04-14-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: How to not include blank cells in an IF function

    Thank you! It works like a charm.
    (Also thanks for the quick response)

+ 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] Need to Autofilter by date and include blank cells
    By Jigsaw314 in forum Excel General
    Replies: 2
    Last Post: 11-05-2012, 08:01 PM
  2. Formulas that include Blank Cells
    By Chantel1326 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-09-2008, 09:36 PM
  3. Use a function in a chart range so it doesn't include a cell if blank?
    By hokeyplyr48 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-03-2008, 12:32 PM
  4. Average Function (include Blank Cells and Zeros)
    By candice.sy@gmail.com in forum Excel General
    Replies: 17
    Last Post: 06-27-2006, 08:40 AM
  5. OFFSET to include blank cells
    By GMCN in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-03-2006, 05:15 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