Home

how to count the number of ranges that are seperated by at least one empty cel

Highlighted
stefan_coolen
Occasional Visitor

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

 MondayTuesdayWednesdaythursfri
person 1111 1
person 21 11 
person 31 1 1

 

1 Reply
Highlighted

Hi Stefan,

That could be

image.png

=SUMPRODUCT((NOT(ISBLANK(B2:K2))*ISBLANK(OFFSET(B2:K2,0,-1))))+NOT(ISBLANK(B2))

Please see attached

Related Conversations
Counting Days
Tim Hunter in SQL Server on
2 Replies
How to count multiple values in a cell
Ugarte335 in Excel on
7 Replies
A problem with the Zoom level of a Tab
Tavory in Discussions on
9 Replies
Count until
MBelshaw in Excel on
1 Replies
Pivot table
gabriellerocha in Excel on
5 Replies
Add Column Using Count
Tim Hunter in SQL Server on
0 Replies