Maverick_777
Board Regular
- Joined
- Sep 23, 2004
- Messages
- 227
Good afternoon all,
I have a question on a counting function.
I can devise a "countif" function to count the number of times a cell has the letter "L" in it with no problem. For the example assume each "L" and "O" are in their own cells.
ex. L O L L O L
The total count of "L"'s would be 4.
However for my question, I want the number to add to 3. Meaning if there were 2 "L"s next to each other or 20 in consecutive cells, I want it to count as One time. This is to account for an Occasion. Two or more in a row would be one occasion.
ex. In the above example, the first "L" would count as 1, the second and third "L" would count as 1 (because it was in two or more adjacent cells), and the 4th "L" would count as 1, for a total of 3 occasions.
If this makes any sense I would appreciate some ideas or thoughts.
Thanks in advance everyone...
I have a question on a counting function.
I can devise a "countif" function to count the number of times a cell has the letter "L" in it with no problem. For the example assume each "L" and "O" are in their own cells.
ex. L O L L O L
The total count of "L"'s would be 4.
However for my question, I want the number to add to 3. Meaning if there were 2 "L"s next to each other or 20 in consecutive cells, I want it to count as One time. This is to account for an Occasion. Two or more in a row would be one occasion.
ex. In the above example, the first "L" would count as 1, the second and third "L" would count as 1 (because it was in two or more adjacent cells), and the 4th "L" would count as 1, for a total of 3 occasions.
If this makes any sense I would appreciate some ideas or thoughts.
Thanks in advance everyone...