+ Reply to Thread
Results 1 to 3 of 3

Formula only active if cell blank

  1. #1
    Registered User
    Join Date
    01-31-2007
    Posts
    47

    Formula only active if cell blank

    I want to show variance (i.e. =A2-A3), but I only want it to calculate if the cell is showing a number (i.e. A3)

    so-
    A2= 1 and A3= 1, then A4=2
    but if-
    A2=1 and A3= blank, then A4=blank (rather than -1)

    Thanks for any help on this presumably basic matter...

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    =IF(A3="","",A2-A3)

    HTH

    Jason

  3. #3
    Registered User
    Join Date
    07-13-2007
    Location
    Netherlands
    Posts
    7
    You also might want to validate before making the calculation (in case there
    are letters rather than numbers in some of the cells):

    =if(and(isnumber(A2);isnumber(A3));A2-A3;"")

+ 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