+ Reply to Thread
Results 1 to 8 of 8

negative formula

  1. #1
    Registered User
    Join Date
    07-18-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2003
    Posts
    22

    negative formula

    I currently have this formula for a vacation accrual spreadsheet. How would you make it show a negative number if he has used more than he has available?

    =IF(L251+N251+O251-SUM(P251:AA251)<0,0,(L251+N251+O251-SUM(P251:AA251)))

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: negative formula

    Just guessing without seeing what's in these cells but remove the IF statement

    =L251+N251+O251-SUM(P251:AA251)
    Does that work?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    07-18-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: negative formula

    l251, n251 and 0251 are just days availabe from last year, earned this year and next yer. and p-aa are the months. I tried the formula but it does not come out right.

    Say an employee has 15 days available for vacation, he took 16 days, it is suppose to be -1 but comes out to 0.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: negative formula

    Okay, so
    L251 + N251 + O251 are the total days the employee has accumulated (although not sure why next year is in there?)

    P251:AA251 are vacation days taken?

  5. #5
    Registered User
    Join Date
    07-18-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: negative formula

    next year is in there because they are allowed to use days they accumulate after their date of hire anniversary.

    so his date of hire is jan 10th, 2011, after that date it was have bee about 7 months so he gets 7 months worth of the years vacation. So 7divide 12 is about 58% so 58% of 15 available days is about 9 days. So he has 9 days for next years vacation that he can use this year.

  6. #6
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: negative formula

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  7. #7
    Registered User
    Join Date
    07-18-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: negative formula

    So this is what is looks like, The first person should have a negative amount of days because he took too many vacation days instead of it showing 0
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: negative formula

    In E6 dragged/copied down

    =K6+M6+N6-SUM(O6:Z6)
    (which is what I recommended in my first post)
    Does that work for you?

+ 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