#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default Number of instances

I have a spread sheet that records sickness levels, what I'm after is a
formula or maybe even a macro that will return the about of sick instances
plus amount of days. The problem is that it needs to somehow have a bit that
due to shift patterns of 4 on 4 off reconises that if the gap is more than 5
days part from the last instance then it is a new instance if it is less than
5 then it's the same instance

Example

At the start of D3 running right out are the days of the month starting from
Jan 01 to Dec 31st
In A4 down to A100 are a list of names
If i use January as an example i need the answer to come to 3 instances and
a total of 12 days off

Cell
D4 = s
E5 = s
F6 = s
G7 = blank
H8 = Blank
I9 = blank
J10 = Blank
K11 = Blank
L12 = Blank
M13 = Blank
N14 = Blank
O15 = s
P16 = Blank
Q17 = Blank
R18 = Blank
S19 = Blank
T20 = s
U21 = s
V22 = s
W23 = s
X24 = blank
Y25 = blank
Z26 = blank
AA27 = blank
AB28 = s
AC29 = s
AD30 = s
AE31 = s

Hope this makes sense

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Number of instances

Your example data seems to be in a diagonal pattern going down and
across the sheet. Wouldn't all the data for one member of staff be on
the same line? And wouldn't you want to have the sickness analysis
carried out for each member of staff? By my reckoning there are 4
instances of sickness in your example data.

A bit more clarification, please.

Pete

On Jul 13, 11:50 am, louiscourtney
wrote:
I have a spread sheet that records sickness levels, what I'm after is a
formula or maybe even a macro that will return the about of sick instances
plus amount of days. The problem is that it needs to somehow have a bit that
due to shift patterns of 4 on 4 off reconises that if the gap is more than 5
days part from the last instance then it is a new instance if it is less than
5 then it's the same instance

Example

At the start of D3 running right out are the days of the month starting from
Jan 01 to Dec 31st
In A4 down to A100 are a list of names
If i use January as an example i need the answer to come to 3 instances and
a total of 12 days off

Cell
D4 = s
E5 = s
F6 = s
G7 = blank
H8 = Blank
I9 = blank
J10 = Blank
K11 = Blank
L12 = Blank
M13 = Blank
N14 = Blank
O15 = s
P16 = Blank
Q17 = Blank
R18 = Blank
S19 = Blank
T20 = s
U21 = s
V22 = s
W23 = s
X24 = blank
Y25 = blank
Z26 = blank
AA27 = blank
AB28 = s
AC29 = s
AD30 = s
AE31 = s

Hope this makes sense



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Number of instances

Given an interpretation of the rule you had in your previous posting (sse
below) , I colud argue there are only 2 instances.

Q15 is within 5 of T20 and W23 is also within 5 of AB28: 1 instance?

You need to spell out much more clearly what the rule(s) is(are).

"Pete_UK" wrote:

Your example data seems to be in a diagonal pattern going down and
across the sheet. Wouldn't all the data for one member of staff be on
the same line? And wouldn't you want to have the sickness analysis
carried out for each member of staff? By my reckoning there are 4
instances of sickness in your example data.

A bit more clarification, please.

Pete

On Jul 13, 11:50 am, louiscourtney
wrote:
I have a spread sheet that records sickness levels, what I'm after is a
formula or maybe even a macro that will return the about of sick instances
plus amount of days. The problem is that it needs to somehow have a bit that
due to shift patterns of 4 on 4 off reconises that if the gap is more than 5
days part from the last instance then it is a new instance if it is less than
5 then it's the same instance

Example

At the start of D3 running right out are the days of the month starting from
Jan 01 to Dec 31st
In A4 down to A100 are a list of names
If i use January as an example i need the answer to come to 3 instances and
a total of 12 days off

Cell
D4 = s
E5 = s
F6 = s
G7 = blank
H8 = Blank
I9 = blank
J10 = Blank
K11 = Blank
L12 = Blank
M13 = Blank
N14 = Blank
O15 = s
P16 = Blank
Q17 = Blank
R18 = Blank
S19 = Blank
T20 = s
U21 = s
V22 = s
W23 = s
X24 = blank
Y25 = blank
Z26 = blank
AA27 = blank
AB28 = s
AC29 = s
AD30 = s
AE31 = s

Hope this makes sense




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Number of instances

Pete,
Data is one row per person: Op mis-posted!

"Pete_UK" wrote:

Your example data seems to be in a diagonal pattern going down and
across the sheet. Wouldn't all the data for one member of staff be on
the same line? And wouldn't you want to have the sickness analysis
carried out for each member of staff? By my reckoning there are 4
instances of sickness in your example data.

A bit more clarification, please.

Pete

On Jul 13, 11:50 am, louiscourtney
wrote:
I have a spread sheet that records sickness levels, what I'm after is a
formula or maybe even a macro that will return the about of sick instances
plus amount of days. The problem is that it needs to somehow have a bit that
due to shift patterns of 4 on 4 off reconises that if the gap is more than 5
days part from the last instance then it is a new instance if it is less than
5 then it's the same instance

Example

At the start of D3 running right out are the days of the month starting from
Jan 01 to Dec 31st
In A4 down to A100 are a list of names
If i use January as an example i need the answer to come to 3 instances and
a total of 12 days off

Cell
D4 = s
E5 = s
F6 = s
G7 = blank
H8 = Blank
I9 = blank
J10 = Blank
K11 = Blank
L12 = Blank
M13 = Blank
N14 = Blank
O15 = s
P16 = Blank
Q17 = Blank
R18 = Blank
S19 = Blank
T20 = s
U21 = s
V22 = s
W23 = s
X24 = blank
Y25 = blank
Z26 = blank
AA27 = blank
AB28 = s
AC29 = s
AD30 = s
AE31 = s

Hope this makes sense




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Number of instances

Thanks Toppers.

To Louis: I answered a similar query in October 2006 - the thread was
titled "Occasions in a sickness record" and it was posted in
public.excel. Perhaps this might be of use to you if you search the
archives for it.

Hope this helps.

Pete

On Jul 13, 7:32 pm, Toppers wrote:
Pete,
Data is one row per person: Op mis-posted!



"Pete_UK" wrote:
Your example data seems to be in a diagonal pattern going down and
across the sheet. Wouldn't all the data for one member of staff be on
the same line? And wouldn't you want to have the sickness analysis
carried out for each member of staff? By my reckoning there are 4
instances of sickness in your example data.


A bit more clarification, please.


Pete


On Jul 13, 11:50 am, louiscourtney
wrote:
I have a spread sheet that records sickness levels, what I'm after is a
formula or maybe even a macro that will return the about of sick instances
plus amount of days. The problem is that it needs to somehow have a bit that
due to shift patterns of 4 on 4 off reconises that if the gap is more than 5
days part from the last instance then it is a new instance if it is less than
5 then it's the same instance


Example


At the start of D3 running right out are the days of the month starting from
Jan 01 to Dec 31st
In A4 down to A100 are a list of names
If i use January as an example i need the answer to come to 3 instances and
a total of 12 days off


Cell
D4 = s
E5 = s
F6 = s
G7 = blank
H8 = Blank
I9 = blank
J10 = Blank
K11 = Blank
L12 = Blank
M13 = Blank
N14 = Blank
O15 = s
P16 = Blank
Q17 = Blank
R18 = Blank
S19 = Blank
T20 = s
U21 = s
V22 = s
W23 = s
X24 = blank
Y25 = blank
Z26 = blank
AA27 = blank
AB28 = s
AC29 = s
AD30 = s
AE31 = s


Hope this makes sense- Hide quoted text -


- Show quoted text -



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
Count the number of Instances louiscourtney Excel Discussion (Misc queries) 4 July 12th 07 09:16 PM
In a set of dates, can you count the number of Jan '07 instances? Linda Woodfield Excel Worksheet Functions 4 June 22nd 07 07:07 PM
Counting number of instances before a certain date JLH Excel Worksheet Functions 5 October 18th 06 01:07 PM
Counting number of instances in a range SSM Excel Worksheet Functions 2 September 7th 06 06:10 PM
Find all text instances in a sheet and add one number from each row Greg Excel Discussion (Misc queries) 1 January 31st 05 11:45 PM


All times are GMT +1. The time now is 04:37 AM.

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"