Thanks,
Joe
I've got tons of date and time relate formulas on the Dates And Times pages
on my web site, starting at www.cpearson.com/excel/datetime.htm . Have a
look around.
Specifically, you might want to use
=DATE(Yr,Mon,1+((Nth-(DoW>=WEEKDAY(DATE(Yr,Mon,1))))*7)+(DoW-WEEKDAY(DATE(Yr
,Mon,1))))
Where Yr is the year, Mon is the month, Nth is the Nth number (e.g., 2 =
second, 3 = third), and DoW is the day of week (1 = Sunday, 2 = Monday,
etc).
If you're looking for VBA code, try
Public Function NthDayOfWeek(Y As Integer, M As Integer, N As Integer, DOW
As Integer) As Date
NthDayOfWeek = DateSerial(Y, M, (8 - WeekDay(DateSerial(Y, M, 1), (DOW + 1)
Mod 8)) + ((N - 1) * 7))
End Function
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting Services
www.cpearson.com ch...@cpearson.com
"Joe Bouterse" <joe...@iquest.net> wrote in message
news:GYR84.4$g3...@news1.iquest.net...