Counting cells with number

Keala

New Member
Joined
Jul 9, 2018
Messages
37
I have issue in count cells which I hope you can suggest a solution for.

I have column with a mix of 0s and value >0. So I need to count number of zeros in between each number>0 and state it on the next column.
It looks like this and what I want to achieve:
1
0
0
0
0
12 count= 4
0
0
0
3 count=3
0
0
0
0
0
0
55 count=6
...

The number of zeros is different all the time, sometimes it is only 3 zeros then a number or sometime it is 55 zeros then a number. I could do this manually with count function but since it is more then 300000 rows it will be quite demanding.

All suggestions are appreciated, maybe a macro is not neccessary and a work sheet solution would do it?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Yes but with some modification. Following code work for me:
[/code]
=SUM(A1:A3)
=COUNTIF(A1:A3;">"&1)
the , is replaced with ;
but the same change in the original code will only give a green arrow at left upper corner on the cell.
 
Upvote 0
Thank you for your help and suggestion, now for a unclear reason it works now! (Which is the main thing.)
 
Upvote 0

Forum statistics

Threads
1,215,487
Messages
6,125,086
Members
449,206
Latest member
ralemanygarcia

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