Thread: Formula help!!
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
scwilly
 
Posts: n/a
Default Formula help!!


Hello this formula is from an earlier post can anyone help me figure out
how to change this formula so that I don't have to use the first of the
month for my date range. If I change the date to say 1/2/2006 it
doesn't work.

A1: (the 1st of the month to start)
A2: (the 1st of the month AFTER the last month)
A3: (the occurrence to calculate…eg 3 for 3rd occurrence)
A4: (The day to find…eg MON for Monday)

C1: =SUMPRODUCT(--(MONTH(DATE(YEAR(A1),MONTH(A1)+ROW(A1:INDEX(A:A,DA
TEDIF(A1,A2,"m"),1))-1,1+7*A3)-WEEKDAY(DATE(YEAR(A1),MONTH(A1)+ROW(A1:INDEX(A:A,D
ATEDIF(A1,A2,"m"),1))-1,8-MATCH(A4,{"SUN","MON","TUE","WED","THU","FRI","SAT
"},0))))=MONTH(DATE(YEAR(A1),MONTH(A1)+ROW(A1: INDE
X(A:A,DATEDIF(A1,A2,"m"),1))-1,1))))


--
scwilly
------------------------------------------------------------------------
scwilly's Profile: http://www.excelforum.com/member.php...o&userid=18251
View this thread: http://www.excelforum.com/showthread...hreadid=535713