Using Excel, need to calculate the difference between two dates, excluding Sundays .
G gwatt Dec 7, 2007 #1 Using Excel, need to calculate the difference between two dates, excluding Sundays .
J Jim Thomlinson Dec 7, 2007 #2 Take a look at this link. Specificaly there is a funciton for counting the number of Mondays in an interval (you can change it for Sunday). Then it is just a matter of subtracting the number of sundays from the total number of days...
Take a look at this link. Specificaly there is a funciton for counting the number of Mondays in an interval (you can change it for Sunday). Then it is just a matter of subtracting the number of sundays from the total number of days...
T T. Valko Dec 7, 2007 #3 One way: A1 = start date A2 = end date =A2-A1-SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&A2)))=1))
G gwatt Dec 7, 2007 #4 Jim, thanks for responding. the function sounds like it will work. however, I do not see the "link" ? where do I find this function? Thanks.
Jim, thanks for responding. the function sounds like it will work. however, I do not see the "link" ? where do I find this function? Thanks.
T T. Valko Dec 7, 2007 #5 Or, you could just count all the days that *aren't* Sundays then subtract 1: =SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&A2)),2)<7))-1
Or, you could just count all the days that *aren't* Sundays then subtract 1: =SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&A2)),2)<7))-1
N Narasimha Dec 8, 2007 #6 Try this "daddylonglegs" formula A1 = start date B1 = end date =SUM(INT((WEEKDAY(A1-{2,3,4,5,6,7})+B1-A1)/7))
Try this "daddylonglegs" formula A1 = start date B1 = end date =SUM(INT((WEEKDAY(A1-{2,3,4,5,6,7})+B1-A1)/7))