Count rows in-between the one's

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,364
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Using column A, how can I count the values in-between each one in column A and produce the results in column B?

Comal Corner.xlsm
AB
1FTCount
211
311
412
52
612
72
812
92
1012
112
1212
132
1412
152
1612
173
1812
192
2011
2111
2213
232
243
2513
262
273
2814
292
303
313
Sheet2
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
How about
Fluff.xlsm
AB
1FTCount
211
311
412
52 
612
72 
812
92 
1012
112 
1212
132 
1412
152 
1612
173 
1812
192 
2011
2111
2213
232 
243 
2513
262 
273 
2814
292 
303 
313 
Master
Cell Formulas
RangeFormula
B2:B31B2=IF(A2=1,IFNA(XMATCH(1,A3:A100),LOOKUP(2,1/(A3:A100<>""),ROW(A3:A100))-ROW()+1),"")
 
Upvote 1
Solution
Or slightly shorter
Excel Formula:
=IF(A2=1,IFNA(XMATCH(1,A3:A100),XMATCH("?",A2:A100&"",2,-1)),"")
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,299
Messages
6,124,132
Members
449,143
Latest member
LightArisen

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