fixthis
New Member
I am in need of a solution to count the number of times the word “Strip” and "Prep" appears in a column but stop when the cumulative time in another column reaches 24 hours (Elapsed Time hrs column).
Data is set up like this:
Start Stop Mode Elapsed Time (min) Elapsed Time (hrs)
12:00am 1:00am Prep 1 1
1:00am 2:00am Strip 1 1
2:00am 3:00am Prep 1 1
(see attached file)
So for when Strip time is 1 hour and Prep time is 1 hour, then starting at midnight, the number of Strip periods would be 12 (to the next midnight). However if I change the prep times to 15 minutes or 0.25 hour, and leave the Strip times at 1 hour, then the table would change and number of Strip times in 24 hours would be 19 and the number of Prep time periods is 20.
Right now I manually change the range to match 24 hours worth of rows using the following formulas:
=COUNTIF($D$4:$D$42,"*Strip*")
=COUNTIF($D$4:$D$42,"*Prep*")
It would be nice to have the formula to account for the time period automatically.
As a bonus, I would like the table rows to be highlighted for those rows being counted within the twenty four hours. Using Excel 2010.
Data is set up like this:
Start Stop Mode Elapsed Time (min) Elapsed Time (hrs)
12:00am 1:00am Prep 1 1
1:00am 2:00am Strip 1 1
2:00am 3:00am Prep 1 1
(see attached file)
So for when Strip time is 1 hour and Prep time is 1 hour, then starting at midnight, the number of Strip periods would be 12 (to the next midnight). However if I change the prep times to 15 minutes or 0.25 hour, and leave the Strip times at 1 hour, then the table would change and number of Strip times in 24 hours would be 19 and the number of Prep time periods is 20.
Right now I manually change the range to match 24 hours worth of rows using the following formulas:
=COUNTIF($D$4:$D$42,"*Strip*")
=COUNTIF($D$4:$D$42,"*Prep*")
It would be nice to have the formula to account for the time period automatically.
As a bonus, I would like the table rows to be highlighted for those rows being counted within the twenty four hours. Using Excel 2010.