L
Les
I have 2 cells next to each other called nextyearfromdate and nextyeartodate. The cells are linked to calendars (Calendar Control 9.0).
In another cell a formula calculates the number of months in the date period which fall on a Thursdays between the 15th and 21st only of the month:-
=IF(COUNT(nextyearfromdate:nextyeartodate)=2,SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(nextyearfromdate & ":" & nextyeartodate)))=5),--(DAY(ROW(INDIRECT(nextyearfromdate & ":" & nextyeartodate)))>=15),--(DAY(ROW(INDIRECT(nextyearfromdate & ":" & nextyeartodate)))<=21)),"enter date")
This formula works fine when you type the dates in the cells, but when a date/dates are chosen from the calendar/s you need to click in the formula bar then press Enter to get the formula to work.
Can anyone tell me how to get this to work automatically?
In another cell a formula calculates the number of months in the date period which fall on a Thursdays between the 15th and 21st only of the month:-
=IF(COUNT(nextyearfromdate:nextyeartodate)=2,SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(nextyearfromdate & ":" & nextyeartodate)))=5),--(DAY(ROW(INDIRECT(nextyearfromdate & ":" & nextyeartodate)))>=15),--(DAY(ROW(INDIRECT(nextyearfromdate & ":" & nextyeartodate)))<=21)),"enter date")
This formula works fine when you type the dates in the cells, but when a date/dates are chosen from the calendar/s you need to click in the formula bar then press Enter to get the formula to work.
Can anyone tell me how to get this to work automatically?