+ Reply to Thread
Results 1 to 7 of 7

Subtracting Numbers in Cells

Hybrid View

  1. #1
    Registered User
    Join Date
    09-02-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    60

    Subtracting Numbers in Cells

    I have 2 rows in my spreadsheet
    A B C
    Time Account Entitlement Remainder
    1 Other Leave 11 xx
    2 Annual Leave 15 xx

    What I wants is that if I take a leave it will start deducting from Other Leave first until the "Other Leave" drops to zero then will it start deducting from the "Annual Leave"
    Last edited by gloom52; 09-10-2009 at 04:05 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Subtracting Numbers in Cells

            A                   B                      C
    Time Account           Entitlement            Remainder
    1 Other Leave              11                     xx
    2 Annual Leave             15                     xx
    Quote Originally Posted by gloom52 View Post
    What I wants is that if I take a leave it will start deducting from Other Leave first until the "Other Leave" drops to zero then will it start deducting from the "Annual Leave"
    Sounds good. Click GO ADVANCED and use the paperclip icon to post up your workbook. We can suggest something when we see where/how you want these calculations in regard to where you're "taking a leave".

    Make sure your sample workbook includes all the information about where you indicate leave.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    09-02-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    60

    Re: Subtracting Numbers in Cells

    heres the attachment a bit messy but I've placed comments on the "Personal Data" and "Aug09" sheet so that u could explain the solution a bit more easily.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Subtracting Numbers in Cells

    I've streamlined all the formulas in I21:I26 including the two you needed help with. I put a BUNCH of "Leave" entries in AUG09 so you'll want to fix those later.

    Also, SEPT09 and NOV09 sheet tabs had extra spaces in the sheet name I had to remove, be careful of those.

  5. #5
    Registered User
    Join Date
    09-02-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    60

    Re: Subtracting Numbers in Cells

    The formulas worked very well but now there seems to be a new problem..
    If I removed all the Leaves, the "Yearly Entitled Leave" remainder becomes zero which should have been the same as the number under "Entitlement"

  6. #6
    Registered User
    Join Date
    09-02-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    60

    Re: Subtracting Numbers in Cells

    Erm forget this last post. I've managed to fixed the problem by changing the False section under the "IF" function to the entitled leave and it works well

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Subtracting Numbers in Cells

    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].


    (Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated)

+ 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