counts of values before change in value

kazekaze

New Member
Joined
Nov 11, 2018
Messages
4
hello,


i have a list,
example,


a , b , b , a , a , e , a




i want to get the individual counts of a value before a change in value.
if i use "count", it simply gives me a=4. another issue is that the value "a" appears again later in the list.




i want the output to be,


a,1
b,2
a,2
e,1
a,1


any ideas how to do it?
thank you.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
If the values are horizontal use the formula =if(B1=A1,column()-1,1)
If the values are vertical use the formula =if(B1=A1,row()-1,1)
drag it till the end of data
ravi shankar
 
Upvote 0
If the values are horizontal use the formula =if(B1=A1,column()-1,1)
If the values are vertical use the formula =if(B1=A1,row()-1,1)
drag it till the end of data
ravi shankar


Hi ravi shankar, perhaps i did not phrase my question well.

attached a picture which hopefully makes it clearer.
4rpOZfm


4rpOZfm
 
Upvote 0
Raw dataabbaaebb
valuecounts
Desired outputa1
b2
a2
e1
b2

<colgroup><col><col span="9"></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,453
Messages
6,124,930
Members
449,195
Latest member
Stevenciu

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