Filter condition "Last Week" - considering week from Monday to Sunday

ErikKontar

New Member
Joined
May 30, 2019
Messages
3
Hi guys,


I have a question I was not able to find an answer anywhere so I need to ask your
advice, hope you can help me :)
When I use Filter condition "Last week" it always considering the week from Sunday to
next Saturday, is there an option to setup this to consider the week from Monday to
Sunday?
Because I need to extend my macro to be able to use it also on Mondays, as I need
always data from previous day, so in case of Mondays it would be data from Friday +
Saturday + Sunday.
The solution would be really easy with "WEEKDAY" function + "Last Week" filter
condition but this is the only thing what holding me back.
I already tried anything but I think there should be some kind of setting in Excel, could
someone help me to solve this? Would much appreciate your help.


Thanks
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
yes I also checked windows settings but there the week starts with Monday, so I was wondering if there is something separate settings only in excel.
 
Upvote 0
You could use the weeknum and adjust the return type to 2, then just filter to previous weeknum

=weeknum(a1,2)
[FONT=&quot][FONT=&quot]Return_type[/FONT][/FONT]
[FONT=&quot][FONT=&quot]Week begins on[/FONT][/FONT]
[FONT=&quot][FONT=&quot]System[/FONT][/FONT]
[FONT=&quot]1 or omitted[/FONT]
[FONT=&quot]Sunday[/FONT]
[FONT=&quot]1[/FONT]
[FONT=&quot]2[/FONT]
[FONT=&quot]Monday[/FONT]
[FONT=&quot]1[/FONT]
[FONT=&quot]11[/FONT]
[FONT=&quot]Monday[/FONT]
[FONT=&quot]1[/FONT]
[FONT=&quot]12[/FONT]
[FONT=&quot]Tuesday[/FONT]
[FONT=&quot]1[/FONT]
[FONT=&quot]13[/FONT]
[FONT=&quot]Wednesday[/FONT]
[FONT=&quot]1[/FONT]
[FONT=&quot]14[/FONT]
[FONT=&quot]Thursday[/FONT]
[FONT=&quot]1[/FONT]
[FONT=&quot]15[/FONT]
[FONT=&quot]Friday[/FONT]
[FONT=&quot]1[/FONT]
[FONT=&quot]16[/FONT]
[FONT=&quot]Saturday[/FONT]
[FONT=&quot]1[/FONT]
[FONT=&quot]17[/FONT]
[FONT=&quot]Sunday[/FONT]
[FONT=&quot]1[/FONT]
[FONT=&quot]21[/FONT]
[FONT=&quot]Monday[/FONT]
[FONT=&quot]2

[/FONT]


<thead style="box-sizing: border-box;">
</thead><tbody style="box-sizing: border-box;">
</tbody>
https://support.office.com/en-us/article/WEEKNUM-function-e5c43a03-b4ab-426c-b411-b18c13c75340
 
Upvote 0
this would be fine, but how can I filter out only previous weeknum? Is there some option what recognize which is the previous weeknum?
Thanks a lot
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,399
Members
448,957
Latest member
Hat4Life

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