Counting the groups

Nykyta

New Member
Joined
Aug 14, 2014
Messages
43
I need to solve the nnext issue (in worksheet or VBA - never mind). In the next column, I have something as:


group

group

blank

group

group

group

blank

group

group

blank

group

group

group

group

blank

group

blank

group

blank

group

blank

group

group

group

blank


... etc ...
What is the best way to find how many groups I have there?
a) groups with 1 "group" repeating;

b) groups with 2 "group" repeating one after another;

c) groups with 3 "group" repeating one after another;

d) groups with 4 "group" repeating one after another;

e) groups with 5 "group" repeating one after another; etc.

I hope that my question is clear enoug. Thanks in advance! Nyk
 
Last edited:
Oeldere, I have no ten hands.
Your solution is something I am dealing with already (many cells, many formulas...). When I wrote that Mike solution is the real / needed one, that should be the hit. In the new Excel file you can check-out the code inside Visual Basic Editor and understand what I am talking about.

I planed to answer to each single user in one post but you were so fast and little bit nervous! Thanks a lot for your time and suggestion.
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Thanks Mick.

If you checkout the solution of MARK858, you’ll see the simplest solution for my problem. There are new excel sample file uploaded (2nd page of this thread). Your code is changing the worksheet and that are not good for this case.

Thanks again for your reply.
 
Upvote 0
Thanks Aladin Akyurek.

As I can see so far, you are counting areas [Ctrl + Shift + Enter] according given condition. That’s also work of course but Mikes solution were the best. I have 12 worksheets and the final one “Analyzes” where I collected all data for further work. All done through VBA so few lines of Mike code a perfect. Your cell-formulas should be in the each of that sheets so… a lot of work saved.

Thanks again for your reply.
 
Upvote 0
Oeldere, as you can see in my sample sheet, I am already using something like that you posted in addition of your solution. That is the main goal.
 
Upvote 0

Forum statistics

Threads
1,216,458
Messages
6,130,754
Members
449,588
Latest member
accountant606

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