+ Reply to Thread
Results 1 to 5 of 5

Cells adding values from another cell and holding that value

  1. #1
    Registered User
    Join Date
    06-25-2013
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    4

    Cells adding values from another cell and holding that value

    Good Morning all, I have read many of the forums, and believe this question has not been fully resolved.
    I have a work book that has a “time sheet” and a "Master Tracking".

    I have one time sheet set up with a drop down list in the cell where the employees name is, this list is generated from the “Master Tracking” Sheet.

    Each employee has a single cell row assigned to them in the master tracking (ie, John= cell row 5, Peter=Cell row 6). I have 100 employees.

    Each month, an employee can earn up 2.5 days of holiday time, based on the number of hours they work. This total is summed up and appears in the master tracking (cell M5 for example).

    One thing I need, is for those hours to be added to the “accumulated” holiday days from previous months in cell N5, once the new days are added, I need cell N5 to hold that value to carry over into the next month, while cell M5 is reset.

    Remembering that each time I chose an employee from the drop down list, their cell row changes
    At the end of the month, the master tracking looks like this


    A M N
    Employee Name Holidays Earned this Month Total Holidays Accumulated
    5 John 2.5 35 ( this is the 2.5 added to last months 32.5)
    6 Peter 2.33 28 ( this is the 2.33 added to last months 25.67)


    Then at the beginning of next month it looks like this

    A M N
    Employee Name Holidays Earned this Month Total Holidays Accumulated
    5 John 35
    6 Peter 28


    I am weakly familiar with VBA codes, and trying to learn more, but as this issue is time sensitive, I was hoping someone can assist. Does this require a VBA, or is there a formula I can use, I am using excel 2013

    Thanks in advance

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Cells adding values from another cell and holding that value

    Attach file with dummy data, showing where you should show result.

  3. #3
    Registered User
    Join Date
    06-25-2013
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Cells adding values from another cell and holding that value

    Thanks kvsrinivasamurthy

    I have in my preparation to send a dummy file, I discovered some other issues, maybe we can take this step by step. I am sending a file for better understanding, the real question now is, is there a way to lock a value into a cell, if that value comes from another set of cells that will change.

    Example in cell M5 of the Master Tracking, the following formula exists.

    =if('Time Sheet'!E1='Master Tracking'!B5,'Time Sheet'!Y17,0)

    the results will be between 0 and 2.5 (from the time sheet) I need this number to hold in place, once cell E1 on the time sheet no longer matches the cell B5 on the Master tracking.

    Time Sheets Example.xlsx

    Thanks

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Cells adding values from another cell and holding that value

    The code below is for Worksheet event .Copy this.

    Please Login or Register  to view this content.
    In the Time Sheet tab

    Right click
    Select View code
    Copy the code
    Close the sheet

    In the Master Tracking sheet delete formulas In M column.
    Last edited by kvsrinivasamurthy; 06-26-2013 at 03:15 AM.

  5. #5
    Registered User
    Join Date
    06-25-2013
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Cells adding values from another cell and holding that value

    Brilliant Kvsrinivasamurthy, that did the trick, thank you very much

+ 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