Return a value, depending on particular day Q

  • Thread starter Thread starter Sean
  • Start date Start date
S

Sean

How could I construct a formula that will return the date of the
following Sunday date, if my file is opened on any day between Tuesday
& Saturday, but if its opened on a Mon, the value returned should be
Today-1 and if its opened on a Sun, the value returned should be
Today.

e.g. Today is 07/02/08, so my formula should return 10/02/08, if my
file is opened today
e.g. if Today was 04/02/08, my formula should return 03/02/08, if my
file is opened on 04/02/08
e.g. if Today was 10/02/08, my formula should return 10/02/08, if my
file is opened on 10/02/08

Hope I have explained it clearly.
 
This should do it:

=TODAY()+IF(WEEKDAY(TODAY())=1,0,IF(WEEKDAY(TODAY())=2,-1,8-
WEEKDAY(TODAY())))

Hope this helps.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top