Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
migdad
 
Posts: n/a
Default Calculate the Days


Friends,
I am looking for formula to calculate the dates between two days
(excluding the weekends)
I am working in Saudi Arabia and the weekend days over here are
thursday and Friday.


--
migdad
------------------------------------------------------------------------
migdad's Profile: http://www.excelforum.com/member.php...o&userid=33976
View this thread: http://www.excelforum.com/showthread...hreadid=537502

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RMTP
 
Posts: n/a
Default Calculate the Days

NETWORKDAYS()

"migdad" wrote:


Friends,
I am looking for formula to calculate the dates between two days
(excluding the weekends)
I am working in Saudi Arabia and the weekend days over here are
thursday and Friday.


--
migdad
------------------------------------------------------------------------
migdad's Profile: http://www.excelforum.com/member.php...o&userid=33976
View this thread: http://www.excelforum.com/showthread...hreadid=537502


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Calculate the Days


If your start date is in A1 and end date in B1

=NETWORKDAYS(a1+2,b1+2)

NETWORKDAYS requires Analysis ToolPak add-in, an alternative

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&B1)))={1,2,3,4,7}))


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=537502

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sandy Mann
 
Posts: n/a
Default Calculate the Days

"daddylonglegs"
wrote in message
news:daddylonglegs.271lrm_1146342302.402@excelforu m-nospam.com...

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&B1)))={1,2,3,4,7}))


Nicely thought out


--
Regards

Sandy
In Perth, the ancient capital of Scotland


with @tiscali.co.uk


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Calculate the Days


daddylonglegs Wrote:
If your start date is in A1 and end date in B1

=NETWORKDAYS(a1+2,b1+2)

NETWORKDAYS requires Analysis ToolPak add-in, an alternative

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&B1)))={1,2,3,4,7}))


....or perhaps a simpler way without using NETWORKDAYS

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

although if you want to exclude holidays too then I think you need the
above SUMPRODUCT formula with an amendment

=SUMPRODUCT((WEEKDAY(ROW(INDIRECT(A1&":"&B1)))={1, 2,3,4,7})*(ISNA(MATCH(ROW(INDIRECT(A1&":"&B1)),H1: H10,0))))

where H1:H10 contains a list of holidays


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=537502



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
migdad
 
Posts: n/a
Default Calculate the Days


Dear Daddylonglegs
Thanks for your support, but I am still facing problem
I need to know the period days and times between two days to see if the
complaints closed within SLA (Service level agreement) or not as I am
working in Bank - Customer Service Department
for example, if I would like to count the different days and time
between the below two
25/04/2006 10:14 AM and 25/04/2006 11:19 AM
When I use the formula SUM(INT((WEEKDAY(C22-{1,2,3,4,7})+C23-C22)/7))
The results will be one day, but actualy the SLA is less than one day.
it should be (0) 1:05 (DD) HH:MM

So please help me on that if you can


--
migdad
------------------------------------------------------------------------
migdad's Profile: http://www.excelforum.com/member.php...o&userid=33976
View this thread: http://www.excelforum.com/showthread...hreadid=537502

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Calculate the Days


OK, that's quite feasible, I think,but not with the previous formulas I
suggested :( Those assumed you were only looking at full days.

Will your times/dates in C22 and C23 always be within working hours,
e.g. Saturday to Wednesday 09:00 to 18:00?

What's the longest period you're likely to have to measure?

What result would you expect where

C22 = 25/04/2006 10:14 AM and
C23 = 26/04/2006 10:00 AM?


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=537502

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
migdad
 
Posts: n/a
Default Calculate the Days


daddylonglegs Wrote:
OK, that's quite feasible, I think,but not with the previous formulas I
suggested :( Those assumed you were only looking at full days.

Will your times/dates in C22 and C23 always be within working hours,
e.g. Saturday to Wednesday 09:00 to 18:00?

What's the longest period you're likely to have to measure?

What result would you expect where

C22 = 25/04/2006 10:14 AM and
C23 = 26/04/2006 10:00 AM?


Thanks,
Attached Excel file to explain the required


--
migdad
------------------------------------------------------------------------
migdad's Profile: http://www.excelforum.com/member.php...o&userid=33976
View this thread: http://www.excelforum.com/showthread...hreadid=537502

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Calculate the Days


OK, assuming start time/date in B1 and end time/date in C1 use this
formula

=NETWORKDAYS(B1+2,C1+2)+NETWORKDAYS(C1+2,C1+2)*(MO D(C1,1)-1)-NETWORKDAYS(B1+2,B1+2)*MOD(B1,1)

format as required, e.g. (d) hh:mm. Note this formatting won't show
correct results when time period is 32 days or longer....


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=537502

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
Formula to calculate number of days & ignore blank cells Mifty Excel Discussion (Misc queries) 7 February 13th 06 10:36 PM
how to calculate a date .. say 34 days from today shaunl Excel Discussion (Misc queries) 5 July 13th 05 02:38 PM
formula to calculate # of days between dates, excluding holidays abs2299 Excel Discussion (Misc queries) 8 March 3rd 05 02:21 AM
how do I calculate the days between dates? stucklady! Excel Discussion (Misc queries) 7 February 12th 05 04:39 PM
HOW TO CALCULATE THE DAYS? Bel Excel Worksheet Functions 2 February 2nd 05 07:05 PM


All times are GMT +1. The time now is 09:02 AM.

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

About Us

"It's about Microsoft Excel"