Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula for displaying date values?

Status
Not open for further replies.

RachelD

MIS
Jun 14, 2000
136
US
Does anyone know of a function in excel, or a formula that will let me show the data of each Sunday in a month?

I need to display the names of the month in one row, and on the row below that, one number in each cell that represents the date of each Sunday in the month.

Any help is appreciated - I don't have time to figure this out!

TIA
Rachel
 
Top row get the dates like jan 2001, feb 2001.
Next row gets first Sunday of the month.
=IF(A1-WEEKDAY(A1)+1<A1,A1-WEEKDAY(A1)+8,A1-WEEKDAY(A1)+1)

Assumes that the months are on the top line!

Below the first Sunday you want each successive Sunday. Put cell above plus 7 unless that is greater than row 1 next column in which case put blank.
=IF(A2+7>B1,&quot;&quot;,A2+7) or similar (that doesn't quite work).

Format top row as MMMM YY.
Next 5 rows (can only have up to 5 Sundays in one month) as ddd dd or as applicable.

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top