+ Reply to Thread
Results 1 to 5 of 5

formula should return zero, but gives 0.05 as percentage

  1. #1
    Registered User
    Join Date
    07-16-2008
    Location
    Calgary, AB
    Posts
    18

    formula should return zero, but gives 0.05 as percentage

    Hello all.

    I'm trying to put together a nice little invoice template for myself to be able to use for any job I work on.

    I seem to be having a problem with one of the calcualtions that I am performing. Please take a look at it;

    =IF(PRODUCT(E40,0.05)>0,PRODUCT(E40,0.05),"")

    This is in a line below a SubTotal line (E40) to calculate a 5% tax on all items. When there is nothing in the SubTotal, this should show a zero......but it's showing 0.05. How do I make it show a zero instead? Is it just something simple like the formatting on the cell?

    Thanks for the help on this!

    Cheers!
    Attached Images Attached Images
    Last edited by tstorzuk; 07-16-2008 at 04:14 PM. Reason: Add image to explain

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Please read our Forum Rules about thread titles, and then edit yours to be descriptive of your problem.

  3. #3
    Forum Contributor wmorrison49's Avatar
    Join Date
    09-25-2007
    Posts
    267
    Hey tstorzuk, try this:

    =IF(E40<>"",(IF(PRODUCT(E40,0.05)>0,PRODUCT(E40,0.05),"")),"")

  4. #4
    Registered User
    Join Date
    07-16-2008
    Location
    Calgary, AB
    Posts
    18
    Super........that works great!!

    Thanks a TON.................and the forum continues to work for us novices.


  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,698
    Thanks for changing the thread title.......

    PRODUCT function ignores empty cells (it doesn't treat it like zero) so when E40 is blank the product is 0.05

    You could change to

    =IF(E40*0.05>0,E40*0.05,"")

    or, as E40*0.05 can only be greater than 0 when E40 is greater than zero, you can simplify further to

    =IF(E40>0,E40*0.05,"")

    Note: I'm assuming that E40 doesn't contain a formula that returns a blank - if it does change to

    =IF(E40="","",E40*0.05)

+ 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