How to calculate the difference between two dates, excluding Sund.

G

gwatt

Using Excel, need to calculate the difference between two dates, excluding
Sundays .
 
J

Jim Thomlinson

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

One way:

A1 = start date
A2 = end date

=A2-A1-SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&A2)))=1))
 
G

gwatt

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

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

Try this "daddylonglegs" formula
A1 = start date
B1 = end date

=SUM(INT((WEEKDAY(A1-{2,3,4,5,6,7})+B1-A1)/7))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top