Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default determining running counts

Hi,

I'm having some trouble figuring out how to keep a running count of some data.

The data:

2009|6/01|6/02|6/03|6/04|6/05|6/06|6/07|6/08|6/09|6/10|6/11|6/12|...and
continues for several months
Emp1| | | A | A | A | | | A | A | A | A | A |...
Emp2| A | P | A | | A | A | A | A | A | | P | A |...
Emp3| A | | | P | A | A | P | | | A | A | P |...
Emp4| A | A | | A | P | A | P | A | | A | A | A |...
and continues for about 40 employees

Employees receive a letter grade for their performance each day they work.
Originally it was supposed to be "A","B","C","D" for varying levels of good
and "F" for poor performance.
In practice it has turned out to be either an "A" for good or a "P" for poor
for each day worked. It they don't work on a particular day, then there is no
entry.

Bonuses are paid to employees who receive 7 "A" grades in a
row(consecutive?, but need not be contiguous, as, if an employee worked 3
days and received "A" grades and then was off work for 2 days and then worked
5 days with "A" grades that world be a total of 8 "A" grades and qualify for
the bonus), a series of 7 "A" grades.

Additional bonuses are also paid at 14, 21, and 28 intervals.

Receiving a €œP€ grades resets the count for bonuses to 0.

Emp1 count=8
Emp2 count=1
Emp3 count=0
Emp4 count=4

If an employee has several series of 7 €œA€ grades each interrupted by a €œP€
grade then they would receive several 7-day bonuses.
If an employee had a series of 15 €œA€ grades and then a €œP€, they would
receive a 7-day bonus and a 14-day bonus.
If an employee had a series of 20 €œA€ grades and then a €œP€ on their 21st
day, they would receive a 7-day bonus and a 14-day bonus. Ouch! Missed out on
the next big bonus by that much!

In trying to track some of the data I have been able to determine:

total €œPoor€ or €œP€ grades {totalPs}
=COUNTIF(B1:CZ1,"P")

total number of days worked {totalDaysWorked}
=COUNTA(B1:CZ1)

% As
=1-{totalPs}/{totalDaysWorked}

recent running count
{bigString1}=CONCATENATE(CZ1,CY1,CX1,€¦,€¦,D1,C1 ,B1)
=IF(ISERROR(SEARCH("p",{bigString1})-1),LEN({bigString1}),SEARCH("p",{bigString1})-1)

But I have not been able to figure out how to determine:

the number of groups of 7 A's
and thus 14, 21, or 28

And I would like to determine the Max number of €œA€ €˜s.
Suppose an employee worked 60 or 70 days in the last few months and received
a €œP€ in the first week but then did well and had 38 €œA€ €˜s before the next
€œP€ grade and has had a combination of €œA€ and €œP€ in the last few weeks, and
currently has a series of 9 €œA€ grades.
How do I determine and keep track of that series of 38?

Are there easier ways to do any of the things Im trying to do?

Thanks in advance for your help.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default determining running counts

Hi,

Instead of explaining my proposed solution, I put together a mock-up that
you can download at the following link:

http://www.professionalexcel.com/for...nctions_01.zip

You can have a look at the forumulas I have used to calculate running daily
counts of consecutive days, taking into account days on leave. The main
lesson is to structure your data in a more managebale way, i.e. my solution
transposes the data and each employee has a column, with each row
representing a day.

I've calculated the count of consectuive days in one column, then added a
further column to make the decision on whether an employee should be paid a
bonus on that given day.

Hope this helps!


--
----------------------------
Please rate this post if it answers your question.

Thanks,

Chris
http://www.ProfessionalExcel.com


"phumpher" wrote:

Hi,

I'm having some trouble figuring out how to keep a running count of some data.

The data:

2009|6/01|6/02|6/03|6/04|6/05|6/06|6/07|6/08|6/09|6/10|6/11|6/12|...and
continues for several months
Emp1| | | A | A | A | | | A | A | A | A | A |...
Emp2| A | P | A | | A | A | A | A | A | | P | A |...
Emp3| A | | | P | A | A | P | | | A | A | P |...
Emp4| A | A | | A | P | A | P | A | | A | A | A |...
and continues for about 40 employees

Employees receive a letter grade for their performance each day they work.
Originally it was supposed to be "A","B","C","D" for varying levels of good
and "F" for poor performance.
In practice it has turned out to be either an "A" for good or a "P" for poor
for each day worked. It they don't work on a particular day, then there is no
entry.

Bonuses are paid to employees who receive 7 "A" grades in a
row(consecutive?, but need not be contiguous, as, if an employee worked 3
days and received "A" grades and then was off work for 2 days and then worked
5 days with "A" grades that world be a total of 8 "A" grades and qualify for
the bonus), a series of 7 "A" grades.

Additional bonuses are also paid at 14, 21, and 28 intervals.

Receiving a €œP€ grades resets the count for bonuses to 0.

Emp1 count=8
Emp2 count=1
Emp3 count=0
Emp4 count=4

If an employee has several series of 7 €œA€ grades each interrupted by a €œP€
grade then they would receive several 7-day bonuses.
If an employee had a series of 15 €œA€ grades and then a €œP€, they would
receive a 7-day bonus and a 14-day bonus.
If an employee had a series of 20 €œA€ grades and then a €œP€ on their 21st
day, they would receive a 7-day bonus and a 14-day bonus. Ouch! Missed out on
the next big bonus by that much!

In trying to track some of the data I have been able to determine:

total €œPoor€ or €œP€ grades {totalPs}
=COUNTIF(B1:CZ1,"P")

total number of days worked {totalDaysWorked}
=COUNTA(B1:CZ1)

% As
=1-{totalPs}/{totalDaysWorked}

recent running count
{bigString1}=CONCATENATE(CZ1,CY1,CX1,€¦,€¦,D1,C1 ,B1)
=IF(ISERROR(SEARCH("p",{bigString1})-1),LEN({bigString1}),SEARCH("p",{bigString1})-1)

But I have not been able to figure out how to determine:

the number of groups of 7 A's
and thus 14, 21, or 28

And I would like to determine the Max number of €œA€ €˜s.
Suppose an employee worked 60 or 70 days in the last few months and received
a €œP€ in the first week but then did well and had 38 €œA€ €˜s before the next
€œP€ grade and has had a combination of €œA€ and €œP€ in the last few weeks, and
currently has a series of 9 €œA€ grades.
How do I determine and keep track of that series of 38?

Are there easier ways to do any of the things Im trying to do?

Thanks in advance for your help.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default determining running counts

Chris,

Thats quite slick.

Im trying to figure out the functions that will work and you done it the
easy way by adding extra separate columns to keep track of the counts.

Thanks for the help.

It also seems that youve come up with a better way to determine the recent
running count, by using the count from the last day worked.

And by determining the Max() of the count I should be able to keep track of
Max number of €œA€ €˜s.

If I add another employee to the data and then sort the employees
alphabetically by name, it appears that I just need to have an equal number
of extra separate columns, with the correct formulas copied across and down.

Thanks again.


"ProfessionalExcel.com" wrote:

Hi,

Instead of explaining my proposed solution, I put together a mock-up that
you can download at the following link:

http://www.professionalexcel.com/for...nctions_01.zip

You can have a look at the forumulas I have used to calculate running daily
counts of consecutive days, taking into account days on leave. The main
lesson is to structure your data in a more managebale way, i.e. my solution
transposes the data and each employee has a column, with each row
representing a day.

I've calculated the count of consectuive days in one column, then added a
further column to make the decision on whether an employee should be paid a
bonus on that given day.

Hope this helps!

----------------------------
Please rate this post if it answers your question.

Thanks,

Chris
http://www.ProfessionalExcel.com

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 915
Default determining running counts

Good Stuff, Chris!

Please don't take this as a criticism, just an observation...

The only thing that seems to be lacking--and something the OP doesn't
address--is what should happen when an employee has a long winning
streak. E.g., if an employee has straight "A"s for 99 days, they earn
the 28 day bonus, but nothing thereafter.

It might make sense if a 28 day bonus should also reset the counters,
but the OP should provide direction on this.

ProfessionalExcel.com wrote:
Hi,

Instead of explaining my proposed solution, I put together a mock-up that
you can download at the following link:

http://www.professionalexcel.com/for...nctions_01.zip

You can have a look at the forumulas I have used to calculate running daily
counts of consecutive days, taking into account days on leave. The main
lesson is to structure your data in a more managebale way, i.e. my solution
transposes the data and each employee has a column, with each row
representing a day.

I've calculated the count of consectuive days in one column, then added a
further column to make the decision on whether an employee should be paid a
bonus on that given day.

Hope this helps!


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default determining running counts

Chris,

Using your ideas and changing a few things around I seem to have arrived at
a solution.

If you would like see what I came up with, you should be able to download it
he

http://www.mediafire.com/?sharekey=8...e6ba49b5870170

Thanks again for the push in an easier direction.

If you see anything that can be improved, or if Im trying to do something
doofus-like, please feel free to point it out.



smartin,

Thanks for the thoughtful comments.

It helped to push me in a direction that should allow for an easier way to
add the ability to track more bonus levels and even the possibility of a
carryover count to the next chart.

28 day streaks are exceedingly rare, and longer streaks even more so.

Fortunately, The-Bonus-Dude (Dude-ette actually) makes a significantly big
deal out of a long €œA€ series, so keeping track of the max in a long €œA€
streak should suffice to determine an employees €œsuper bonus€.
If in the future, the number of €œA€ streaks that go longer than 28 and then
beyond the next number, say 35, increases by a reasonable amount (more than
the 2 or 3 that we have now) then I think it will be fairly easy to add a
counter for that new number.

For our use, we would not reset after 28, because each successive bonus
increases in value, so we want to keep track of how long a series continues.
Perhaps in the future we will need to add more levels of bonus to the five
(7, 14, 21, 28, and max) that we already have.
Who knows, maybe this spreadsheet will make it easier to see what amount of
bonuses are being paid out and our whole bonus program will change.


"smartin" wrote:

Good Stuff, Chris!

Please don't take this as a criticism, just an observation...

The only thing that seems to be lacking--and something the OP doesn't
address--is what should happen when an employee has a long winning
streak. E.g., if an employee has straight "A"s for 99 days, they earn
the 28 day bonus, but nothing thereafter.

It might make sense if a 28 day bonus should also reset the counters,
but the OP should provide direction on this.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default determining running counts

smartin,

Good spot on the bonuses after 28 days. For completeness I've modified a
second version so that it uses the maximum consecutive days trigger to
restart the first bonus:

http://www.professionalexcel.com/for...tions_01v2.zip

Whether this makes practical sense, I won't start that debate. I expect you
have to draw the line somewhere on having a max days bonus, then reverting
back to the start. I mean, at some point I would have thought a promotion is
required for 1000s of A days, not just a bonus!

phumpher,

I'm glad you found my comments useful. I've had a quick look at your
solution and it seems ok. Interesting technique using the decimal addition to
avoid counting duplicates. I think your safe in the assumption that no one
will get 1000 'A' days in a row to ruin your calculations ;o)

Regards,

--
----------------------------
Please rate this post if it answers your question.

Thanks,

Chris
http://www.ProfessionalExcel.com


"smartin" wrote:

Good Stuff, Chris!

Please don't take this as a criticism, just an observation...

The only thing that seems to be lacking--and something the OP doesn't
address--is what should happen when an employee has a long winning
streak. E.g., if an employee has straight "A"s for 99 days, they earn
the 28 day bonus, but nothing thereafter.

It might make sense if a 28 day bonus should also reset the counters,
but the OP should provide direction on this.

ProfessionalExcel.com wrote:
Hi,

Instead of explaining my proposed solution, I put together a mock-up that
you can download at the following link:

http://www.professionalexcel.com/for...nctions_01.zip

You can have a look at the forumulas I have used to calculate running daily
counts of consecutive days, taking into account days on leave. The main
lesson is to structure your data in a more managebale way, i.e. my solution
transposes the data and each employee has a column, with each row
representing a day.

I've calculated the count of consectuive days in one column, then added a
further column to make the decision on whether an employee should be paid a
bonus on that given day.

Hope this helps!



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
average daily counts to weekly counts Dave Excel Discussion (Misc queries) 0 June 17th 08 06:24 PM
counts Arvind Mahto Excel Discussion (Misc queries) 3 May 23rd 08 03:27 PM
Counts Nordic Excel Discussion (Misc queries) 2 September 20th 07 03:33 AM
Column Counts Brurobiney Excel Discussion (Misc queries) 1 March 15th 07 09:07 PM
counts of dates jjuan New Users to Excel 4 February 1st 07 01:33 PM


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