+ Reply to Thread
Results 1 to 5 of 5

Thread: make formula not calculate if cell value is 0

  1. #1
    Registered User
    Join Date
    02-03-2009
    Location
    Bracey, Virginia
    MS-Off Ver
    Excel 2000
    Posts
    14

    make formula not calculate if cell value is 0

    I'm using this formula in column X (=V2-1.5%*V2-0.25)
    My problem is is if any of the cells in column V are 0 it gives me a -.25 for a result.
    How can I make the formula ignore the cells with 0 & return a total of 0 for the result?
    Last edited by markcoronado; 08-26-2009 at 02:13 PM.

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

    Re: make formula not calculate if cell value is 0

    Try

    =Max(0,V2-1.5%*V2-0.25)
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    02-03-2009
    Location
    Bracey, Virginia
    MS-Off Ver
    Excel 2000
    Posts
    14

    Re: make formula not calculate if cell value is 0

    Quote Originally Posted by NBVC View Post
    Try

    =Max(0,V2-1.5%*V2-0.25)
    Thanks, that worked.
    I'm not sure I understand why but it worked.
    I'll have to do some research.

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

    Re: make formula not calculate if cell value is 0

    Well MAX() returns the maximum of all it's arguments (or results of its arguments)...

    so if you have the formula I gave above.. and your part returned a negative number, then 0 would be the Max of the 2... but if your part returned a positive number, then that number being greater than (or even equal to 0) would be returned...
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  5. #5
    Registered User
    Join Date
    02-03-2009
    Location
    Bracey, Virginia
    MS-Off Ver
    Excel 2000
    Posts
    14

    Re: make formula not calculate if cell value is 0

    OK I got it now.

    In Excel, the Max function returns the largest value from the numbers provided.

+ 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.2.0