ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Dates (https://www.excelbanter.com/excel-worksheet-functions/78492-dates.html)

Barbara

Dates
 
I need to calculate the (for example) first Wednesday of every month, given
the date April 5, 2006 is entered in a cell. How do I calculate the new
date, the first Wednesday in May (May 3, 2006)?

David Billigmeier

Dates
 
This will work. Currently outputs the first Wednesday of the month of the
date entered in cell A1.

=DATE(YEAR(A1),MONTH(A1),1+MOD(4-WEEKDAY(DATE(YEAR(A1),MONTH(A1),1)),7))

--
Regards,
Dave


"Barbara" wrote:

I need to calculate the (for example) first Wednesday of every month, given
the date April 5, 2006 is entered in a cell. How do I calculate the new
date, the first Wednesday in May (May 3, 2006)?


daddylonglegs

Dates
 

If you have April 5, 2006 in A1 then in A2 copied down use this formula

=A1+35-(DAY(A1+28)<9)*7


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=524476



All times are GMT +1. The time now is 10:14 PM.

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