Number multiple same names

SOLTEC

Board Regular
Joined
Feb 11, 2015
Messages
195
Office Version
  1. 365
  2. 2019
Platform
  1. Windows

Cell Formulas
RangeFormula
A1Product ID
A21
A42
A83
A144
B1Name
B2Replacement Boot Laces
B3Replacement Boot Laces
B4Blousing Garters
B5Blousing Garters
B6Blousing Garters
B7Blousing Garters
B8GI Extreme Cold Weather Bunny Boots
B9GI Extreme Cold Weather Bunny Boots
B10GI Extreme Cold Weather Bunny Boots
B11GI Extreme Cold Weather Bunny Boots
B12GI Extreme Cold Weather Bunny Boots
B13GI Extreme Cold Weather Bunny Boots
B14Nylon Commando Wallet
B15Nylon Commando Wallet
B16Nylon Commando Wallet
B17Nylon Commando Wallet
B18Nylon Commando Wallet
B19Nylon Commando Wallet
B20Nylon Commando Wallet
B21Pepper Sprays Gel Sabre Red
B22Fire Master Fog Pepper Spray
B23Pepper Sprays Gel Sabre Red
B24Pepper Sprays Gel Sabre Red
B25Pepper Sprays Gel Sabre Red
B26Pepper Sprays Gel Sabre Red
B27Key Chain Pepper Spray
B28Pepper Sprays Gel Sabre Red
B29Cop Top Fog Cone Pepper Spray
B30Flip Top Stream Pepper Spray
B31Flip Top Cop Med Fog Cone Pepper Spray
B32Pepper Sprays Gel Sabre Red
B33Cop Top Stream Pepper Spray
B34Pepper Sprays Gel Sabre Red
B35Cop Top Fog Cone Pepper Spray
B36Flip Top Stream Pepper Spray
B37Flip Top Cop Med Fog Cone Pepper Spray
B38Cop Top Stream Pepper Spray
B39Pepper Sprays Gel Sabre Red
B40Pepper Sprays Gel Sabre Red
B41Police Magnum Sabre Red
B42Pepper Sprays Gel Sabre Red

I need a function or formula to number the first unique name for 7,000 items. As you can see the names are not always sequential. Thank you in advance for any and all assistance, it is greatly appreciated. See 1, 2, 3, 4 for example
 
Your original post appears you want to have a number in only the first occurance of each identicle value.

That's what this formula does.
 
Upvote 0
If you want to have the unique numbers in ALL identicle cells..

Put the first number in A2 by hand.

Then in A3 and filled down
=IF(B3=B2,A2,A2+1)
 
Upvote 0
This isn't correct either as the Pepper Sprays Gel Sabre Red each have a different number. They should all be the same first number. (5 I believe)


Excel 2010
AB
1IDName
21Replacement Boot Laces
31Replacement Boot Laces
42Blousing Garters
52Blousing Garters
62Blousing Garters
72Blousing Garters
83GI Extreme Cold Weather Bunny Boots
93GI Extreme Cold Weather Bunny Boots
103GI Extreme Cold Weather Bunny Boots
113GI Extreme Cold Weather Bunny Boots
123GI Extreme Cold Weather Bunny Boots
133GI Extreme Cold Weather Bunny Boots
144Nylon Commando Wallet
154Nylon Commando Wallet
164Nylon Commando Wallet
174Nylon Commando Wallet
184Nylon Commando Wallet
194Nylon Commando Wallet
204Nylon Commando Wallet
215Pepper Sprays Gel Sabre Red
226Fire Master Fog Pepper Spray
237Pepper Sprays Gel Sabre Red
247Pepper Sprays Gel Sabre Red
257Pepper Sprays Gel Sabre Red
267Pepper Sprays Gel Sabre Red
278Key Chain Pepper Spray
289Pepper Sprays Gel Sabre Red
2910Cop Top Fog Cone Pepper Spray
3011Flip Top Stream Pepper Spray
3112Flip Top Cop Med Fog Cone Pepper Spray
3213Pepper Sprays Gel Sabre Red
3314Cop Top Stream Pepper Spray
3415Pepper Sprays Gel Sabre Red
3516Cop Top Fog Cone Pepper Spray
3617Flip Top Stream Pepper Spray
3718Flip Top Cop Med Fog Cone Pepper Spray
3819Cop Top Stream Pepper Spray
3920Pepper Sprays Gel Sabre Red
4020Pepper Sprays Gel Sabre Red
4121Police Magnum Sabre Red
4222Pepper Sprays Gel Sabre Red
Sheet1
Cell Formulas
RangeFormula
A2=IF(COUNTIF($B$2:B2,B2)=1,COUNT($A$1:A1)+1,"")
A3=IF(B3=B2,A2,A2+1)
A4=IF(B4=B3,A3,A3+1)
A5=IF(B5=B4,A4,A4+1)
A6=IF(B6=B5,A5,A5+1)
A7=IF(B7=B6,A6,A6+1)
A8=IF(B8=B7,A7,A7+1)
A9=IF(B9=B8,A8,A8+1)
A10=IF(B10=B9,A9,A9+1)
A11=IF(B11=B10,A10,A10+1)
A12=IF(B12=B11,A11,A11+1)
A13=IF(B13=B12,A12,A12+1)
A14=IF(B14=B13,A13,A13+1)
A15=IF(B15=B14,A14,A14+1)
A16=IF(B16=B15,A15,A15+1)
A17=IF(B17=B16,A16,A16+1)
A18=IF(B18=B17,A17,A17+1)
A19=IF(B19=B18,A18,A18+1)
A20=IF(B20=B19,A19,A19+1)
A21=IF(B21=B20,A20,A20+1)
A22=IF(B22=B21,A21,A21+1)
A23=IF(B23=B22,A22,A22+1)
A24=IF(B24=B23,A23,A23+1)
A25=IF(B25=B24,A24,A24+1)
A26=IF(B26=B25,A25,A25+1)
A27=IF(B27=B26,A26,A26+1)
A28=IF(B28=B27,A27,A27+1)
A29=IF(B29=B28,A28,A28+1)
A30=IF(B30=B29,A29,A29+1)
A31=IF(B31=B30,A30,A30+1)
A32=IF(B32=B31,A31,A31+1)
A33=IF(B33=B32,A32,A32+1)
A34=IF(B34=B33,A33,A33+1)
A35=IF(B35=B34,A34,A34+1)
A36=IF(B36=B35,A35,A35+1)
A37=IF(B37=B36,A36,A36+1)
A38=IF(B38=B37,A37,A37+1)
A39=IF(B39=B38,A38,A38+1)
A40=IF(B40=B39,A39,A39+1)
A41=IF(B41=B40,A40,A40+1)
A42=IF(B42=B41,A41,A41+1)
 
Upvote 0
OK, fair enough.
It seemed at first glance that your data was sorted so that all similar values were grouped together...
I see now that's not the case..

Try this in A2 and filled down
=IF(ISNA(MATCH(B2,B$1:B1,0)),MAX(A$1:A1)+1,INDEX(A$1:A1,MATCH(B2,B$1:B1,0)))
 
Upvote 0
Thank you Thank you a thousand times Thank YOU very much.
 
Upvote 0

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