ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Return the first Wednesday of each month (https://www.excelbanter.com/excel-worksheet-functions/243845-return-first-wednesday-each-month.html)

dalymjl

Return the first Wednesday of each month
 
If I put a date in cell A1 (1/1/2010) how do I get the first wednesday in each month in 2010 to display in cells A2:A13 i.e
6/1/2010
3/2/2010
3/3/2010 etc.?

ExcelBanter AI

Answer: Return the first Wednesday of each month
 
To return the first Wednesday of each month in 2010, use the following formula:

Formula:

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

This formula works by taking the date in cell A1, extracting the year and month, and then adding the number of days needed to get to the first Wednesday of that month. The MOD function is used to ensure that the correct number of days is added, even if the first day of the month is a Wednesday.

To apply this formula to the rest of the year:
  1. Copy the formula in cell A2.
  2. Select the range of cells where you want to apply the formula.
  3. Right-click and select "Paste" or press "Ctrl+V".
Excel will automatically adjust the formula to reference the correct month for each row.

Alternatively, you can use the "Fill Series" feature in Excel:
  1. Enter the first Wednesday date (6/1/2010) in cell A2.
  2. Select cells A2:A13.
  3. Click on the "Fill Handle" (the small square in the bottom right corner of the selection) and drag it down to fill in the rest of the dates.
Excel will automatically fill in the dates based on the pattern it detects in the first two cells.

Teethless mama

Return the first Wednesday of each month
 
=DATE(YEAR(A1),MONTH(A1),8)-WEEKDAY(DATE(YEAR(A1),MONTH(A1),4))



"dalymjl" wrote:


If I put a date in cell A1 (1/1/2010) how do I get the first wednesday
in each month in 2010 to display in cells A2:A13 i.e
6/1/2010
3/2/2010
3/3/2010 etc.?




--
dalymjl


Teethless mama

Return the first Wednesday of each month
 
In A2:
=DATE(YEAR(A1),MONTH(A1)+MIN(1,ROWS($1:1)-1),8)-WEEKDAY(DATE(YEAR(A1),MONTH(A1)+MIN(1,ROWS($1:1)-1),4))

copy down to A13



"dalymjl" wrote:


If I put a date in cell A1 (1/1/2010) how do I get the first wednesday
in each month in 2010 to display in cells A2:A13 i.e
6/1/2010
3/2/2010
3/3/2010 etc.?




--
dalymjl


T. Valko

Return the first Wednesday of each month
 
Try this...

Enter this formula in A2. This will return the 1st Wednesday of the month
for the date entered in A1.

=A1-DAY(A1)+8-WEEKDAY(A1-DAY(A1)-3)

Enter this formula in A3 and copy down as needed. This will return the 1st
Wednesday date for the subsequent months.

=A2+28+((DAY(A2+35)<8)*7)

Format as Date

--
Biff
Microsoft Excel MVP


"dalymjl" wrote in message
...

If I put a date in cell A1 (1/1/2010) how do I get the first wednesday
in each month in 2010 to display in cells A2:A13 i.e
6/1/2010
3/2/2010
3/3/2010 etc.?




--
dalymjl




Bernd P

Return the first Wednesday of each month
 
Hello,

A general formula:
http://www.sulprobil.com/html/weekday_in_month.html

Regards,
Bernd


All times are GMT +1. The time now is 08:58 PM.

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