Count if This week / Count if last week

Welsh Mark3

Board Regular
Joined
Apr 7, 2014
Messages
164
Office Version
  1. 365
Looking to create two formulas - One to count instances in the last workweek, the second to count the week before. I think formula one does what I need to do but it looks at the last 7 days rather than the last workweek. The second looks at the last 14 days, can I amend this to show last week?

Formula 1 =COUNTIF(E:E,">="&TODAY()-7)
Formula 2 =COUNTIF(E:E,">="&TODAY()-14)
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi Mark,

See if these work? Counting dates for Monday to Friday only?

Book1
ABCE
1Dates
2This week117/01/2022
3Last Week716/01/2022
4Week before315/01/2022
514/01/2022
613/01/2022
712/01/2022
811/01/2022
910/01/2022
1010/01/2022
1110/01/2022
127/01/2022
136/01/2022
143/01/2022
152/01/2022
161/01/2022
Sheet1
Cell Formulas
RangeFormula
B2B2=COUNTIFS(E:E,">="&(TODAY())-(WEEKDAY(TODAY(),2)-1),E:E,"<="&(TODAY())-(WEEKDAY(TODAY(),2)-1)+4)
B3B3=COUNTIFS(E:E,">="&(TODAY()-7)-(WEEKDAY(TODAY(),2)-1),E:E,"<="&(TODAY()-7)-(WEEKDAY(TODAY(),2)-1)+4)
B4B4=COUNTIFS(E:E,">="&(TODAY()-14)-(WEEKDAY(TODAY(),2)-1),E:E,"<="&(TODAY()-14)-(WEEKDAY(TODAY(),2)-1)+4)
 
Upvote 0

Forum statistics

Threads
1,215,753
Messages
6,126,677
Members
449,327
Latest member
John4520

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