+ Reply to Thread
Results 1 to 5 of 5

have a function but if the answer is a negative I want it to say zero "0"

  1. #1
    Registered User
    Join Date
    03-10-2013
    Location
    Tucson, Arizona
    MS-Off Ver
    Excel 2003
    Posts
    15

    have a function but if the answer is a negative I want it to say zero "0"

    I have an install date and date of my monthly report, I need to know how many days have lapsed at the time of my report from that install date, some of the entries on my sheet have not been installed yet so they are showing up as a negative number and I need them to show as a zero "0". Also if someone has completed their time during the reporting period, I need the days to stop counting at their removal date. This is a constant sheet that I will be adding too daily and no one will be taken off, so I will be doing a lot of sorting to make my reports to the individual agencies. I am attaching a copy of my worksheet. I appreciate any and all help I can get.

    I am not "tech" savvy! Please be easy on me with the jargon! lol

    Thank you!

    Laurie

    PS: if you can explain what the (Tags thing below is for?
    Attached Files Attached Files
    Last edited by LaurieLaurie; 03-10-2013 at 06:19 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,603

    Re: have a function but if the answer is a negative I want it to say zero "0"

    One way:

    G2: =MAX(L2-B2,0)


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: have a function but if the answer is a negative I want it to say zero "0"

    Hi Laurie

    Try the attached spreadsheet. To test if it works the way you are expecting, change the report date.

    Hope this helps.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: have a function but if the answer is a negative I want it to say zero "0"

    Laurie, welcome to the forum.

    I'm flat out of time right now, but this will get you started:

    Please Login or Register  to view this content.
    is a formula which tells Excel that if L3 minus B3 is less than 0, return 0; otherwise, return whatever L3 - B3 is. I've popped it in the attached for you.

    Hope this helps.
    Attached Files Attached Files
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,603

    Re: have a function but if the answer is a negative I want it to say zero "0"

    Thanks for the rep.

+ 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