Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Holidays | Excel Worksheet Functions | |||
Holidays | Excel Worksheet Functions | |||
holidays | Excel Discussion (Misc queries) | |||
Holidays | Excel Worksheet Functions | |||
Skip the Holidays 2 | Excel Discussion (Misc queries) |