+ Reply to Thread
Results 1 to 5 of 5

Countif only when a cell is blank.

  1. #1
    Registered User
    Join Date
    02-08-2008
    Location
    Co. Down, Ireland.
    Posts
    53

    Countif only when a cell is blank.

    Hi all,

    If I want a simple subtraction to take place in cell a3 say between cell a1 and cell a2 yet this is dependant that cell a4 does not have anything in it, ( a date or a text string), what is the most appropriate formula to use?

  2. #2
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    =if(a4="",a1-a2,"")

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =IF(A4<>"",A2-A1,"")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    02-08-2008
    Location
    Co. Down, Ireland.
    Posts
    53
    Would this also work:

    =IF(A4="","",(A2-A1)).


    Thanks everyone for the help on this.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by Stevie-B
    Would this also work:

    =IF(A4="","",(A2-A1)).


    Thanks everyone for the help on this.
    Yes it would... it will give you A2-A1 only if A4 is not blank

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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