Automatic date entry
You are welcome! Thanks for the feedback!
Bob's original message was:
Generic formula
=DATE(YEAR(A1),MONTH(A1),1+7*Nth)-WEEKDAY(DATE(YEAR(A1),MONTH(A1),8-DoW);2)
Nth is the instance, 1st,.2nd etc, DoW is the serial number of the Day,
Sun=1, Mon=2, etc.
Maybe the problem was that you didn't take into account different numbering
of days. In Bob's usage of WEEKDAY Sun=1, Mon=2. If you want Mon=1, Tue=2
type of numbering, then modify the formula:
=DATE(YEAR(A1),MONTH(A1),1+7*Nth)-WEEKDAY(DATE(YEAR(A1),MONTH(A1),8-DoW);2)
Stefi
€˛George B€¯ ezt Ć*rta:
Hi Stefi
thanks for the help. I used nos. 1, 2 and 4 all worked great.
Could not get no.3 to work and so used the answer from Ram
thanks
george--
Every decision you make - is a decision about who you are
"Stefi" wrote:
Month No being in A2:
€˛George B€¯ ezt Ć*rta:
I have a spreadsheet where you enter the month. The spreadsheet is organised
into weeks . The weeks run from Sunday to Saturday. I would like to be able
to enter the Month and then have excel enter :-
1.) the no of days in the month in a cell
=DAY(DATE(YEAR(TODAY()),$A$2+1,0))
2.)the opening date of the month in week 1 worksheet
=DATE(YEAR(TODAY()),$A$2,1)
3.) the closing date of the first week of the month (ie the first sat) in
week 1 worksheet
=DATE(YEAR(TODAY()),A2,1+7*1)-WEEKDAY(DATE(YEAR(TODAY()),A2,8-7))
(from Bob Philips)
4.) the closing date of the end of the month in week 5 worksheet
=DATE(YEAR(TODAY()),$A$2+1,0)
Regards,
Stefi
|