count consecutive numbers/entries in column

Future

New Member
Joined
Mar 22, 2008
Messages
27
I have a column with 54127 rows. The entries are 1, false, or blank.
Many of these 3 possible entries are consecutive.

In the next 3 columns I would like a formula that will count the consecutive
1's, false, or blank entries. Each of the three new columns will reference
separately the 3 possible entries.

Using Excel 2007.

Thanks for any help/ideas.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
If you have data in A2 down then with B1:D1 blank or text headers you can use this formula in B2

=IF(A2=1,SUM(B1,1),"")

and in C2

=IF(A2="",SUM(C1,1),"")

and in D2

=IF(AND(A2=FALSE,A2<>""),SUM(D1,1),"")

Now select B2:D2, type B2:D52128 in the box above A1 to select the whole range....and then CTRL+D to populate the formulas into that range
 
Upvote 0
If you have data in A2 down then with B1:D1 blank or text headers you can use this formula in B2

=IF(A2=1,SUM(B1,1),"")

and in C2

=IF(A2="",SUM(C1,1),"")

and in D2

=IF(AND(A2=FALSE,A2<>""),SUM(D1,1),"")

Now select B2:D2, type B2:D52128 in the box above A1 to select the whole range....and then CTRL+D to populate the formulas into that range
Can this formula be modified to show only the last of the consecutive numbers?
For example one sequence displays 1-54 in the column. I would like just the 54
to be displayed. Thanks for any assistance.
 
Upvote 0

Forum statistics

Threads
1,214,959
Messages
6,122,476
Members
449,087
Latest member
RExcelSearch

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top