#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 48
Default Remove weekends

I have 2 dates and time:
5/21/2010 11:34 is in A2
5/25/2010 11:34 is in A3

If I subtract them, I get 4 days in cell A4.
I would like to subtract the weekends and give me a total of 2 days.

I came across this before, but forgot how to do it. Any help! Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 83
Default Remove weekends

On Sat, 22 May 2010 12:58:00 -0700 (PDT), rhhince
wrote:

I have 2 dates and time:
5/21/2010 11:34 is in A2
5/25/2010 11:34 is in A3

If I subtract them, I get 4 days in cell A4.
I would like to subtract the weekends and give me a total of 2 days.

I came across this before, but forgot how to do it. Any help! Thanks.


Assuming that the hours and minutes are significant and not always the
same in A2 and A3.
Also assuming that neither A2 or A3 hold a time on a weekend.

Try this formula:

=A3-A2-SUMPRODUCT((A2+ROW(1:999)<A3)*(WEEKDAY(A2+ROW(1:99 9),2)5))

The 999 is a number bigger than the largest expected difference
between A3 and A2.

Hope this helps / Lars-Åke
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Remove weekends

Hi,

Try this

=networkdays(A2,A3). With the dates mentioned below, the answer would be 3

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"rhhince" wrote in message
...
I have 2 dates and time:
5/21/2010 11:34 is in A2
5/25/2010 11:34 is in A3

If I subtract them, I get 4 days in cell A4.
I would like to subtract the weekends and give me a total of 2 days.

I came across this before, but forgot how to do it. Any help! Thanks.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
remove weekends on graphs Rick in Roanoke Excel Discussion (Misc queries) 1 September 10th 09 09:00 PM
How to remove weekends from the chart Saran Charts and Charting in Excel 2 February 24th 09 01:02 PM
Remove weekends from a Chart Ross12345 Excel Discussion (Misc queries) 0 August 12th 08 10:03 AM
Remove weekends from a stock chart pb Charts and Charting in Excel 4 April 14th 07 08:56 PM
How to remove weekends from chart in Excel 2007 ? GPS Charts and Charting in Excel 1 April 13th 07 02:34 PM


All times are GMT +1. The time now is 03:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"