+ Reply to Thread
Results 1 to 7 of 7

Function Help Working with a Zero Value

  1. #1
    Registered User
    Join Date
    10-31-2010
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2007/2010
    Posts
    41

    Function Help Working with a Zero Value

    I'm having trouble resolving what is probably something very simple. I'm using the function IF(L7=0,"",L7-2), the problem is that how do I write this to work if the cell value is a Zero?
    Thanks
    Brenda

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

    Re: Function Help Working with a Zero Value

    Not sure I understand.

    Can you explain it further?
    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.

  3. #3
    Registered User
    Join Date
    10-31-2010
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2007/2010
    Posts
    41

    Re: Function Help Working with a Zero Value

    Sorry, using the following as an example IF(L7=0,"",L7-2). I use this to to calculate cell values based on the value of L7. It works with any number other than zero. It doesn't come up often, but if a zero is placed in L7, no calculations are made.

    Thanks
    Brenda

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

    Re: Function Help Working with a Zero Value

    That is because the formula is saying that IF L7 equals 0, to return a "blank". Just remove that part...

    e.g. =L7-2

  5. #5
    Registered User
    Join Date
    10-31-2010
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2007/2010
    Posts
    41

    Re: Function Help Working with a Zero Value

    Thanks, this is one of those have your cake and eat it to moments. We have it set that way due to the spreadsheet being posted on an in-house website. If we have =L7-2, and no value is input in L7 (occurs often) then cells L8:L15 keep their previous value. I'm just tinkering with ideas on how to make this work and look good and the same time.

    Thanks for all of the help
    Brenda

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

    Re: Function Help Working with a Zero Value

    If you use:

    =IF(L7="","",L7-2)

    then this will leave cells blank if L7 is blank and only evaluate if L7 has an entry in it.

  7. #7
    Registered User
    Join Date
    10-31-2010
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2007/2010
    Posts
    41

    Re: Function Help Working with a Zero Value

    I tried that and if L7 is 0 then L8 is blank. Sorry for the trouble.

+ 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