#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default culculating holidays

Hi. i am trying to set spreadsheets of holidays for each peasron
i have tryed to use DATEDIF formula but seems to be it is not what i need
as, for example, if person took days off on 16/03/07 and 17/03/07 it gives me
result as only 1 day. what formula shell i use?
thank you for your help
Svetlana
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default culculating holidays

If the dates you've got are the start and end dates of the holiday, then
you'll need to add 1 day to what DATEDIF gives you, as DATEDIF gives the
number of days difference between the dates, which is of course 1 day in the
case of your example. (So if your first day and last day of the holiday are
the same, the DATEDIF function gives zero and you add 1). Instead of
DATEDIF you could merely have used =B1-A1 (and still added 1 to get your
desired result). Bear in mind, however, that (either with the simple
formula or with DATEDIF) you may struggle with half days of holiday, & (more
significantly) it won't deal with weekends. To cope with weekends (and bank
holidays if applicable) you may want to use the NETWORKDAYS function.
--
David Biddulph

"Svetlana" wrote in message
...
Hi. i am trying to set spreadsheets of holidays for each peasron
i have tryed to use DATEDIF formula but seems to be it is not what i need
as, for example, if person took days off on 16/03/07 and 17/03/07 it gives
me
result as only 1 day. what formula shell i use?
thank you for your help
Svetlana



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default culculating holidays

Thank you very much for your reply. hope it will work always the way i need.
Regards
Svetlana


"David Biddulph" wrote:

If the dates you've got are the start and end dates of the holiday, then
you'll need to add 1 day to what DATEDIF gives you, as DATEDIF gives the
number of days difference between the dates, which is of course 1 day in the
case of your example. (So if your first day and last day of the holiday are
the same, the DATEDIF function gives zero and you add 1). Instead of
DATEDIF you could merely have used =B1-A1 (and still added 1 to get your
desired result). Bear in mind, however, that (either with the simple
formula or with DATEDIF) you may struggle with half days of holiday, & (more
significantly) it won't deal with weekends. To cope with weekends (and bank
holidays if applicable) you may want to use the NETWORKDAYS function.
--
David Biddulph

"Svetlana" wrote in message
...
Hi. i am trying to set spreadsheets of holidays for each peasron
i have tryed to use DATEDIF formula but seems to be it is not what i need
as, for example, if person took days off on 16/03/07 and 17/03/07 it gives
me
result as only 1 day. what formula shell i use?
thank you for your help
Svetlana




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
Holidays JB Excel Worksheet Functions 2 January 10th 07 12:27 PM
Holidays edwardpestian Excel Worksheet Functions 2 July 25th 06 04:02 PM
holidays bamboozled Excel Discussion (Misc queries) 4 May 29th 06 04:08 PM
Holidays Jerry Levinson Excel Worksheet Functions 2 January 14th 06 12:39 AM
Skip the Holidays 2 Aviator Excel Discussion (Misc queries) 9 January 13th 05 12:37 PM


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

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"