Last 365 days only days that I worked

richblake74

Active Member
Joined
Dec 30, 2006
Messages
284
Office Version
  1. 365
Platform
  1. MacOS
Hello all and thank you in advance.
I would like my logbook to total the values from a column based on only the last WORK days that I worked.
Then I would also like a cell that totals all the Values based on the last 365 calendar days.

I have included the workbook hopefully that will explain things much better.
Thank you all.

1576480747999.png
 

Attachments

  • Screenshot 2019-12-16 at 06.57.51.png
    Screenshot 2019-12-16 at 06.57.51.png
    188.7 KB · Views: 3

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
=COUNTIFS(B,"<="&TODAY(),B,">="&,B2,e,"<>"&"OFF") would this do anything to solve my counting?
 
Upvote 0
Try this in F2 and fill down,

=IF(B2>TODAY(),0,F3+1)

Then this to get your total

=SUMIFS(D:D,F:F,">0",F:F,"<=365")

Format as [h]:mm:ss
 
Upvote 0
Thank you for you reply but, in the formula I only want it to count WORK days. This seems to be counting all days?
=IF(B2>TODAY(),0,F3+1)
1576485914450.png
 
Upvote 0
Thank you for you reply but, in the formula I only want it to count WORK days. This seems to be counting all days?
=IF(B2>TODAY(),0,F3+1)


Also what I would like, if I have multiple entries for one day it just counts it as 1 instead of counting all occurrences
1576486300927.png
 
Upvote 0
Try this one instead

=IF(B2>TODAY(),0,F3+AND(E2="Work",B3>B2))
 
Upvote 0
Thank you but it still is not working for me. Its still counting the 16th Dec Even though I am OFF (which is should not count) also on the 11th December all the 4 occurrences I want to count as One day.
Thank you
COUNTIFS(B:B,"<="&TODAY(),B:B,">="&B4,X:X,"<>"&"OFF"). I had this is Numbers but doesn't seem to be carrying over to Excel (columns were different)
1576509983954.png
 
Upvote 0
Thank you but it still is not working for me. Its still counting the 16th Dec Even though I am OFF (which is should not count) also on the 11th December all the 4 occurrences I want to count as One day.
Thank you
COUNTIFS(B:B,"<="&TODAY(),B:B,">="&B4,X:X,"<>"&"OFF"). I had this is Numbers but doesn't seem to be carrying over to Excel (columns were different)
View attachment 2104
=COUNTIFS(B:B,"<="&TODAY(),B:B,">="&B613,E:E,"<>"&"OFF")
 
Upvote 0
The formula that I suggested is working fine for me with some random dates for testing.

=IF(B2>TODAY(),0,F3+AND(E2="Work",B3>B2))

Assumes that the first date to look at is in B2, that the formula is going into F2 and that the Work / Off formula is in column E.

Are your dates proper valid excel dates formatted as dd-mmm-yy or are they text strings that look like dates?
If you change the format of the date cells to 'General' proper dates will change to 5 digit numbers between 48000 and 49000 for the dates in your example. If they don't change then they are invalid text dates which might be the cause of the formulas not working.
 
Upvote 0
That was all that I needed etc, thank you all very much for everything. Works perfect
 
Upvote 0

Forum statistics

Threads
1,215,491
Messages
6,125,102
Members
449,205
Latest member
ralemanygarcia

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top