Excel formula to get dates excluding saturdays and sundays

abhay_547

Board Regular
Joined
Sep 12, 2009
Messages
179
Hi All,

I have a date column in excel against a product column where I have to populate different dates against each product based on the expected data arriving timeliness for each product. for e.g. for product1, i have expected timeliness of Today minus 2 which means if today is 3rd Sept then I will get the data of 1st Sept and same way for some products it's T-1 then it means on 3rd Sept I will get the data for 2nd sept and third condition is T .i.e. Today in which the data will be as of today for that product and the forth condition is weekly which we can ignore as the date for such product data is not fixed. Now I want to arrive at a formula which will give me T-2, T-1 dates first I straight away used the below formula

.i.e. =today()-2 for T-2 and =today()-1 for T-1

but the above formulas also give me the dates of that days which are sunday or saturday so I want to exclude saturdays and sundays and get only workdays .i.e. Monday to Friday dates. Please help.

Thanks a lot for your help in advance. :)
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
For T-2 try

=WORKDAY(TODAY(),-2)

In Excel 2003 and earlier this requires the Analysis Toolpak from Tools > Add-ins.
 
Upvote 0
Hi VOG,

Thanks a lot for your quick reply, but I don't want to use the workday formula as we have excel 2003 at our end and though I check the analysis tool pack in the addin option but it's not necessary that others to whom I will be sending this file will have that option checked in in the addin already and as those people to whom the file is sent are most senior level guys I can't ask them to follow any such instructions to view my file contents. Hope you understand. I would like to use a formula which will work in any person's pc irrespective whatever excel version they use. Please help.

Thanks a lot for your help in advance. :)
 
Upvote 0
One alternative for T-2 is:

Code:
=TODAY()-CHOOSE(WEEKDAY(TODAY()),3,4,4,2,2,2,2)

T-1 would be

Code:
=TODAY()-CHOOSE(WEEKDAY(TODAY()),2,3,1,1,1,1,1)

It shows how WEEKDAY made the process easier.

Mike
 
Upvote 0

Forum statistics

Threads
1,224,578
Messages
6,179,652
Members
452,934
Latest member
mm1t1

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