ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to calculate the difference between two dates, excluding Sund. (https://www.excelbanter.com/excel-discussion-misc-queries/168882-how-calculate-difference-between-two-dates-excluding-sund.html)

gwatt

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

Jim Thomlinson

How to calculate the difference between two dates, excluding Sund.
 
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...
--
HTH...

Jim Thomlinson


"gwatt" wrote:

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


T. Valko

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

A1 = start date
A2 = end date

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

--
Biff
Microsoft Excel MVP


"gwatt" wrote in message
...
Using Excel, need to calculate the difference between two dates, excluding
Sundays .




gwatt

How to calculate the difference between two dates, excluding S
 
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 Thomlinson" wrote:

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...
--
HTH...

Jim Thomlinson


"gwatt" wrote:

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


T. Valko

How to calculate the difference between two dates, excluding Sund.
 
Or, you could just count all the days that *aren't* Sundays then subtract 1:

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&A2)),2)<7))-1

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
One way:

A1 = start date
A2 = end date

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

--
Biff
Microsoft Excel MVP


"gwatt" wrote in message
...
Using Excel, need to calculate the difference between two dates,
excluding
Sundays .






Narasimha

How to calculate the difference between two dates, excluding Sund.
 
Try this "daddylonglegs" formula
A1 = start date
B1 = end date

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



"gwatt" wrote:

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


gwatt

How to calculate the difference between two dates, excluding S
 
Great, Thanks. I subtracted one to get the actual day's lapsed.

"Narasimha" wrote:

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

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



"gwatt" wrote:

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



All times are GMT +1. The time now is 08:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com