Haminteu
Haminteu

Reputation: 1334

Excel Custom Row Number

I have a table on excel:

     A        B         C         D        E
--------------------------------------------
1    Group    Number    Value
2    SS       001       20
3    SS       002       10
4    BN       001       30
5    GU       001       10

I want to have an automatic row number per "Group". Also, the "Number" column, should be automatic too. So, if I type "SS" on row number 6, then the Number value should be "003". If I type "BN" on row number 7, then the Number value should be "002".

Is there a way to do that? Really appreciated.
Thanks a lot.

Upvotes: 0

Views: 353

Answers (2)

nightcrawler23
nightcrawler23

Reputation: 2066

Batman's :) formula is also correct. I added formatting to get exactly what you want.

=TEXT(SUMPRODUCT(--($A$2:A2=A2)),"00#")

Drag this formula down

Upvotes: 2

Chris Moore
Chris Moore

Reputation: 456

In cell B6, enter the formula =countif(A:A,A6) and then fill down. That should do it for you.

Upvotes: 0

Related Questions