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.
 

Some videos you may like

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
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
 

Future

New Member
Joined
Mar 22, 2008
Messages
27
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,331
Messages
5,595,549
Members
413,996
Latest member
mabelO

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
Top