ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Function to set Date (https://www.excelbanter.com/excel-worksheet-functions/248599-function-set-date.html)

j

Function to set Date
 
Hi,

I would like to know how to set below equation:-

to set the 1-week (i.e Monday) prior to a specific date: e.g. 2009/11/24, i
would like to have the output = 2009/11/16

e.g. 2009/12/31, output = 2009/12/21
--
J

Ashish Mathur[_2_]

Function to set Date
 
Hi,

Try this. Cell B16 holds the specific date

=B16-7-CHOOSE(WEEKDAY(B16-7,2),0,1,2,3,4,5,6)

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"J" wrote in message
...
Hi,

I would like to know how to set below equation:-

to set the 1-week (i.e Monday) prior to a specific date: e.g. 2009/11/24,
i
would like to have the output = 2009/11/16

e.g. 2009/12/31, output = 2009/12/21
--
J




All times are GMT +1. The time now is 01:56 PM.

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