Filter By Last 3 days or 3 Business Days

Shreesurya

Board Regular
Joined
Jul 7, 2014
Messages
50
Hi Excel Experts,

Need your help on filtering the column by last 3 business days or days plus Blank Cells in a column.

If 3 days doesn't meet the requirements then it has to filter 3 business days and it has to be dynamic based on the recent dates in column.

Could you please help me with VBA Code for it...

Thank you
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
You could add an extra column to calculate the days.

If your date column is in C2:C6 try =NETWORKDAYS(C2,TODAY()) in D2 and drag down.
You can then filter this column to <=3 or if you're on 365 you can use =FILTER($B$2:$C$6,$D$2:$D$6<=3) providing your data is in B2:C6 with a helper column in D2:D6.

You could update column D formula to =IF(C6="",0,NETWORKDAYS(C6,TODAY())) to take into account blank cells.

Use =NETWORKDAYS.INTL if your weekend isn't Saturday/Sunday.
 
Upvote 0
You could add an extra column to calculate the days.

If your date column is in C2:C6 try =NETWORKDAYS(C2,TODAY()) in D2 and drag down.
You can then filter this column to <=3 or if you're on 365 you can use =FILTER($B$2:$C$6,$D$2:$D$6<=3) providing your data is in B2:C6 with a helper column in D2:D6.

You could update column D formula to =IF(C6="",0,NETWORKDAYS(C6,TODAY())) to take into account blank cells.

Use =NETWORKDAYS.INTL if your weekend isn't Saturday/Sunday.
Thank you so much....
 
Upvote 0

Forum statistics

Threads
1,214,544
Messages
6,120,126
Members
448,947
Latest member
test111

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