A Amit Kumar Singh Mar 25, 2009 #1 i want to count how many manday, wednesday and friday in between two different date in excel
D Domenic Mar 25, 2009 #2 Assuming that A2 contains the start date, and B2 contains the end date, try the following... To count the number of Mondays... =SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A2&":"&B2)),2)=1)) To count the number of Mondays, Wednesdays, and Fridays... =SUMPRODUCT(--ISNUMBER(MATCH(WEEKDAY(ROW(INDIRECT(A2&":"&B2)),2),{1,3,5}, 0))) Change the return type for the WEEDAY functions accordingly... Monday = 1 Tuesday = 2 Wednesday = 3 Thursday = 4 Friday = 5 Saturday = 6 Sunday = 7 Hope this helps! http://www.xl-central.com
Assuming that A2 contains the start date, and B2 contains the end date, try the following... To count the number of Mondays... =SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A2&":"&B2)),2)=1)) To count the number of Mondays, Wednesdays, and Fridays... =SUMPRODUCT(--ISNUMBER(MATCH(WEEKDAY(ROW(INDIRECT(A2&":"&B2)),2),{1,3,5}, 0))) Change the return type for the WEEDAY functions accordingly... Monday = 1 Tuesday = 2 Wednesday = 3 Thursday = 4 Friday = 5 Saturday = 6 Sunday = 7 Hope this helps! http://www.xl-central.com