#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Sickness dates

I have a spreadsheet which shows staff sickness each month. I would like to
classify whether each absence is 'short term' or 'long term' in column F.
Any absence which is continuous 20 days or more would be classed as long term.

Here's an example

A B C D
E F
Ref No Name Start Date End Date Total
Length
3421 Jones 21/11/09 30/11/09 10
Long Term
3421 Jones 01/12/09 17/12/09 17
Long Term
8756 Sue 02/07/09 08/07/09 7
Short Term


In this example, Mr Jones has had 27 days continous absence in total and so
this would be a long term absence. The text in column F is what I want to
see as a result.

Any help would be really useful.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Sickness dates

One way is to use SUMIF to sum the "Totals" col E by the names in col B, then
check the result vs the criteria of 20 days = Long Term
Put this in F2:
=IF(SUMIF(B:B,B2,E:E)20,"Long Term",IF(SUMIF(B:B,B2,E:E)0,"Short Term",""))
Copy down. Success? celebrate it, hit YES below
--
Max
Singapore
---
"Charles S" wrote:
I have a spreadsheet which shows staff sickness each month. I would like to
classify whether each absence is 'short term' or 'long term' in column F.
Any absence which is continuous 20 days or more would be classed as long term.

Here's an example

A B C D
E F
Ref No Name Start Date End Date Total
Length
3421 Jones 21/11/09 30/11/09 10
Long Term
3421 Jones 01/12/09 17/12/09 17
Long Term
8756 Sue 02/07/09 08/07/09 7
Short Term


In this example, Mr Jones has had 27 days continous absence in total and so
this would be a long term absence. The text in column F is what I want to
see as a result.

Any help would be really useful.

  #3   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Sickness dates

=IF(SUMIF(B:B,B2,E:E)20,"Long Term",IF(SUMIF(B:B,B2,E:E)0,"Short Term",""))

Oops, change the "20" in the formula to: =20
(you indicated: 20 days or more)
--
Max
Singapore
---
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Sickness dates

Max - thank you for replying. Just checking about continuous dates - if
Jones took a further 1 day absence in January 2010, I need this to show as
short term only. Is there a formula to cope with this as well?

"Max" wrote:

=IF(SUMIF(B:B,B2,E:E)20,"Long Term",IF(SUMIF(B:B,B2,E:E)0,"Short Term",""))


Oops, change the "20" in the formula to: =20
(you indicated: 20 days or more)
--
Max
Singapore
---

  #5   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Sickness dates

You'd probably need to add a new column to your data set to distinguish/flag
non continuous from continuous dates cases, and populate this col manually.
Then use sumproduct (instead of sumif) to take care of the multi-criteria
summing.
--
Max
Singapore
---
"Charles S" wrote:
Max - thank you for replying. Just checking about continuous dates - if
Jones took a further 1 day absence in January 2010, I need this to show as
short term only. Is there a formula to cope with this as well?


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
Linking computer dates (time) to spreadsheet dates that have formu bigisle Excel Worksheet Functions 3 January 3rd 10 08:05 PM
Counting half days holiday and sickness in excel Wayne New Users to Excel 4 December 16th 08 02:37 PM
need to convert list of dates to count no. of dates by week neowok Excel Worksheet Functions 13 January 30th 06 03:54 PM
Charting data against dates where dates are not at fixed intervals PK Charts and Charting in Excel 4 June 16th 05 05:08 AM
Holiday/Sickness chart jules New Users to Excel 2 February 23rd 05 02:05 PM


All times are GMT +1. The time now is 04:29 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"