Counting challenge in Excel
December 2, 2006 8:25 AM
Subscribe
Excel question: I can't figure out how to count what I want to count...
I'm trying to set up a spreadsheet that will tell me two things: first, the number of consecutive days I've accomplished a goal (ending today), and second, the longest run of consecutive days I've done something So, for the row:
x x x o o o o o o o o x x x o o o o o
I want the output "5" to represent the number of consecutive days I've achieved my goal to date and the output "8" to represent my longest run. But, I don't see how I can use countif because I must select the whole row and I don't want to count the earlier o's, just specific ones.
I am using conditional formatting so I cannot use blank cells to represent completed or uncompleted--I must use values to do this.
Excel gurus, please help!
posted by underwater to computers & internet (6 comments total)
1 user marked this as a favorite
0 0 0 1 1 1 1 1 1 1 1 -8 0 0 1 1 1 1 1?
In that case, the largest run is abs(min value),
the current run is the sum.
When you fail on a day, you just have to make the next value be -(sum)
posted by JMOZ at 8:38 AM on December 2, 2006