Group unique value

rplim2016

Board Regular
Joined
Jun 28, 2016
Messages
76
Hi Mr. Excel,

I need help, as my lead challenge me but I can't do it in any means. He only wants me to use a formula in column B. Only FORMULA.

Col A:
a
b
b
a
a
b
c
c
c

Col B: Answer must me in group unique value
1
2
2
1
1
2
3
3
3

Please help.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Book1
AB
1itemgroup
2a1
3b2
4b2
5a1
6a1
7b2
8c3
9c3
10c3
Sheet1


In B2 enter and copy down:

=IF(ISNA(MATCH($A2,$A$1:A1,0)),MAX($B$1:B1)+1,VLOOKUP($A2,$A$1:$B1,2,0))
 
Upvote 0
Hi there. This should work:

In cell B1 put the value 1 (As its the first entry it will always be 1). In cell B2 put this formula '=IF(ISNA(VLOOKUP(A2,A$1:A1,1,FALSE)),MAX(B$1:B1)+1,VLOOKUP(A2,A$1:B1,2,FALSE))' and drag B2 down column B. The use of $ signs is important so make sure you put the formula exactly as written.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

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