ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Date, Weekdays (https://www.excelbanter.com/excel-discussion-misc-queries/44846-date-weekdays.html)

Heckstein

Date, Weekdays
 

Hi!

Could you please help me with date formula.

I need to enter 2 days before but it must be a weekday.
e.g 12 Sep 2005 must show 9 Sep 2005 and also 13 Sep 2005 must show 9
Sep 2005.

What I have is NOW()-2 , but it shows 10 Sep 2005 which is wrong.


--
Heckstein
------------------------------------------------------------------------
Heckstein's Profile: http://www.excelforum.com/member.php...o&userid=27153
View this thread: http://www.excelforum.com/showthread...hreadid=466653


PeterAtherton



"Heckstein" wrote:


Hi!

Could you please help me with date formula.

I need to enter 2 days before but it must be a weekday.
e.g 12 Sep 2005 must show 9 Sep 2005 and also 13 Sep 2005 must show 9
Sep 2005.

What I have is NOW()-2 , but it shows 10 Sep 2005 which is wrong.

Hi

Try
=IF(WEEKDAY(TODAY())=6,TODAY()-1,IF(WEEKDAY(TODAY())=1,TODAY()-2,TODAY()-2))

Regards
Peter

Sandy Mann

=IF(WEEKDAY(TODAY(),2)<3,TODAY()-1-WEEKDAY(TODAY()),TODAY()-2)

--
HTH

Sandy

Replace@mailinator with @tiscali.co.uk


"Heckstein" wrote
in message ...

Hi!

Could you please help me with date formula.

I need to enter 2 days before but it must be a weekday.
e.g 12 Sep 2005 must show 9 Sep 2005 and also 13 Sep 2005 must show 9
Sep 2005.

What I have is NOW()-2 , but it shows 10 Sep 2005 which is wrong.


--
Heckstein
------------------------------------------------------------------------
Heckstein's Profile:
http://www.excelforum.com/member.php...o&userid=27153
View this thread: http://www.excelforum.com/showthread...hreadid=466653




Ron Rosenfeld

On Sun, 11 Sep 2005 14:26:18 -0500, Heckstein
wrote:


Hi!

Could you please help me with date formula.

I need to enter 2 days before but it must be a weekday.
e.g 12 Sep 2005 must show 9 Sep 2005 and also 13 Sep 2005 must show 9
Sep 2005.

What I have is NOW()-2 , but it shows 10 Sep 2005 which is wrong.


=WORKDAY(TODAY()-1,-1)

Note that with this function, you can optionally add a list of Holidays.


If the WORKDAY function is not available, and returns the #NAME? error, install
and load the Analysis ToolPak add-in.

On the Tools menu, click Add-Ins.
In the Add-Ins available list, select the Analysis ToolPak box, and then click
OK.
If necessary, follow the instructions in the setup program.

--ron


All times are GMT +1. The time now is 04:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com