+ Reply to Thread
Results 1 to 7 of 7

Counting hours since last day off

  1. #1
    Registered User
    Join Date
    05-05-2019
    Location
    Detroit, Michigan
    MS-Off Ver
    2013
    Posts
    13

    Counting hours since last day off

    Hi there. I'm currently working a job that allows me to take a day off when I reach a certain amount of hours worked. I'm creating a spreadsheet to help track this. Is there any formula that I could use to track the amount of hours I have worked since my last day off? For instance, I have a column that has a cell for each day showing how many hours i worked that day. When i take a day off i will fill that days cell with the word "DAY OFF", I want the function to return the total hours worked since the last "DAY OFF". Any help would be great, thanks in advance!
    Last edited by skizgg; 01-27-2022 at 04:06 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,933

    Re: Counting hours since last day off

    There are instructions at the top of the page explaining how to attach your sample workbook.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    05-05-2019
    Location
    Detroit, Michigan
    MS-Off Ver
    2013
    Posts
    13

    Re: Counting hours since last day off

    I have attached a Sample Workbook here
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,933

    Re: Counting hours since last day off

    Try this:

    =SUMIF(B:B,">"&INDEX(B:B,LOOKUP(2,1/(D:D="DAY OFF"),ROW(D:D))),D:D)

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

    Re: Counting hours since last day off

    Try this

    =SUM(INDEX($D$1:$D$50,AGGREGATE(14,6,ROW($D$1:$D$50)*($D$1:$D$50="DAY OFF"),1)+1):$D$50)
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  6. #6
    Registered User
    Join Date
    05-05-2019
    Location
    Detroit, Michigan
    MS-Off Ver
    2013
    Posts
    13

    Re: Counting hours since last day off

    That works great. Thank you very much for your help! I would have never come up with that on my own

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,933

    Re: Counting hours since last day off

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help counting hours in VBA
    By WarWabbit in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-30-2016, 04:58 AM
  2. Elapsed working hours, without counting weekends or non-working hours
    By ebkiwi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-16-2013, 04:18 PM
  3. Counting difference between hours if outside of business hours
    By joytech22 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 07-15-2013, 05:03 AM
  4. Excel 2007 : counting hours
    By stonefacedolly in forum Excel General
    Replies: 10
    Last Post: 03-17-2010, 05:27 PM
  5. Counting Hours
    By Don Juan in forum Excel General
    Replies: 4
    Last Post: 11-17-2009, 01:16 PM
  6. Counting hours
    By Analyst99 in forum Excel General
    Replies: 3
    Last Post: 10-26-2006, 07:20 PM
  7. Counting hours
    By vanilla_bean_orange via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-17-2006, 07:15 AM

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