ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Today()-1 (https://www.excelbanter.com/excel-discussion-misc-queries/118295-today-1-a.html)

Wanna Learn

Today()-1
 
Hello I have a cell formatted as =TODAY()-1 which is fine. The problem is
on Monday I want Friday's date, and of course, I get Sunday's date. How can I
correct this? thanks

Gary''s Student

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

--
Gary's Student


"Wanna Learn" wrote:

Hello I have a cell formatted as =TODAY()-1 which is fine. The problem is
on Monday I want Friday's date, and of course, I get Sunday's date. How can I
correct this? thanks


Dave F

Today()-1
 
What does this mean in English: IF today is Monday, then TODAY minus 3, ELSE
TODAY minus 1?
--
Brevity is the soul of wit.


"Gary''s Student" wrote:

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

--
Gary's Student


"Wanna Learn" wrote:

Hello I have a cell formatted as =TODAY()-1 which is fine. The problem is
on Monday I want Friday's date, and of course, I get Sunday's date. How can I
correct this? thanks


Bob Phillips

Today()-1
 
Get the previous WORKING day.

If today is a Monday, subtract 3 days from it so as to avoid Saturday and
Sunday, otherwise just subtract 1 day.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Dave F" wrote in message
...
What does this mean in English: IF today is Monday, then TODAY minus 3,

ELSE
TODAY minus 1?
--
Brevity is the soul of wit.


"Gary''s Student" wrote:

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

--
Gary's Student


"Wanna Learn" wrote:

Hello I have a cell formatted as =TODAY()-1 which is fine. The

problem is
on Monday I want Friday's date, and of course, I get Sunday's date.

How can I
correct this? thanks




Bob Phillips

Today()-1
 

=WORKDAY(TODAY(),-1)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Wanna Learn" wrote in message
...
Hello I have a cell formatted as =TODAY()-1 which is fine. The problem

is
on Monday I want Friday's date, and of course, I get Sunday's date. How

can I
correct this? thanks




Wanna Learn

Today()-1
 
Gary Thank you
and Dave F
an extra thanks for the "English" explanation. Since the only way to learn
is to understand what is being said.
"Dave F" wrote:

What does this mean in English: IF today is Monday, then TODAY minus 3, ELSE
TODAY minus 1?
--
Brevity is the soul of wit.


"Gary''s Student" wrote:

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

--
Gary's Student


"Wanna Learn" wrote:

Hello I have a cell formatted as =TODAY()-1 which is fine. The problem is
on Monday I want Friday's date, and of course, I get Sunday's date. How can I
correct this? thanks


Bob Phillips

Today()-1
 
I think Dave was asking for an English explanation.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Wanna Learn" wrote in message
...
Gary Thank you
and Dave F
an extra thanks for the "English" explanation. Since the only way to

learn
is to understand what is being said.
"Dave F" wrote:

What does this mean in English: IF today is Monday, then TODAY minus 3,

ELSE
TODAY minus 1?
--
Brevity is the soul of wit.


"Gary''s Student" wrote:

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

--
Gary's Student


"Wanna Learn" wrote:

Hello I have a cell formatted as =TODAY()-1 which is fine. The

problem is
on Monday I want Friday's date, and of course, I get Sunday's date.

How can I
correct this? thanks




Wanna Learn

Today()-1
 
Thanks Bob

"Bob Phillips" wrote:


=WORKDAY(TODAY(),-1)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Wanna Learn" wrote in message
...
Hello I have a cell formatted as =TODAY()-1 which is fine. The problem

is
on Monday I want Friday's date, and of course, I get Sunday's date. How

can I
correct this? thanks






All times are GMT +1. The time now is 05:23 PM.

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