![]() |
Return a value, depending on particular day Q
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. |
Return a value, depending on particular day Q
This should do it:
=TODAY()+IF(WEEKDAY(TODAY())=1,0,IF(WEEKDAY(TODAY( ))=2,-1,8- WEEKDAY(TODAY()))) Hope this helps. Pete On Feb 7, 2:45*pm, Sean wrote: 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. |
Return a value, depending on particular day Q
Very clever Pete, thanks
|
Return a value, depending on particular day Q
You're welcome, Sean.
Pete On Feb 7, 3:32*pm, Sean wrote: Very clever Pete, thanks |
All times are GMT +1. The time now is 10:11 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com