count until another column changes then reset count

guhl_yarden

New Member
Joined
May 3, 2018
Messages
2
Hi All,

Could please someone help me with some formula? It drives me crazy since days/weeks.
I would like to do the following but dont even have an idea how to describe it :D

Count "A" until there is "B". Stop countung "A" but start count "B". If there is "A" again start over but add 1 to the last "A" value :) Hope its clear :D
Maybe this picture helps more than 1000 words.


885excel.jpg


Im using Excel 2016 but have uploaded on google drive as well in the case the picture gets lost in the ether:
https://docs.google.com/spreadsheets/d/1ZCiNsD6bYOnp74HUy7V1ZLZRz9QZl_nt3l59PO83czs/edit?usp=sharing

Thanks in advance everyone :)
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
If "A" always occurs first then:


Book1
ABCD
343
4
5A1 
6A1
7
8A1
9A1
10
11
12B1
13B1
14B1
15
16B1
17
18A2
19A2
20A2
21A2
22B2
23B2
24
25A3
26A3
27B3
28
29
30
31
32B3
33
34
35A4
Sheet1
Cell Formulas
RangeFormula
C3=MAX(C$5:C$35)
C5=IF($A5="A",MAX($D$4:$D4)+1,"")
D3=MAX(D$5:D$35)
D5=IF($B5="B",MAX($C$4:$C4),"")


WBD
 
Upvote 0

Forum statistics

Threads
1,223,712
Messages
6,174,031
Members
452,542
Latest member
Bricklin

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