Forum Discussion
stefan_coolen
Dec 19, 2018Copper Contributor
how to count the number of ranges that are seperated by at least one empty cel
i would like to count the number of ranges that are filled with data. In this example the outcome should be that row one has two ranges filed with data. Row 2 as well and row three has three ranges filled with data. This is for a spreadsheet where i want to count the frequency a person has called in sick. In the real example i have all the days of the month as columns and in the first column the names. So in this example in this week person one has called in sick on monday, stayed sick for three day, came to work on thursday and called in sick again on friday. The frequency of person 1 calling in sick is 2. That is the number i want
Monday | Tuesday | Wednesday | thurs | fri | |
person 1 | 1 | 1 | 1 | 1 | |
person 2 | 1 | 1 | 1 | ||
person 3 | 1 | 1 | 1 |
Hi Stefan,
That could be
=SUMPRODUCT((NOT(ISBLANK(B2:K2))*ISBLANK(OFFSET(B2:K2,0,-1))))+NOT(ISBLANK(B2))
Please see attached