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
 
In B2:
=IF(COUNTIF($C$2:C2,C2)=1,COUNT($B$1:B1)+1,"")

Copy down.
 
Upvote 0
When I copy the formula in B2 and run it down it just deletes all my entries.
 
Upvote 0
Sorry, in A2:
=IF(COUNTIF($B$2:B2,B2)=1,COUNT($A$1:A1)+1,"")

Copy down.
 
Upvote 0

Excel 2010
AB
1Product IDName
21Replacement Boot Laces
31Replacement Boot Laces
4 Blousing Garters
53Blousing Garters
6 Blousing Garters
7 Blousing Garters
8 GI Extreme Cold Weather Bunny Boots
94GI Extreme Cold Weather Bunny Boots
10 GI Extreme Cold Weather Bunny Boots
11 GI Extreme Cold Weather Bunny Boots
12 GI Extreme Cold Weather Bunny Boots
13 GI Extreme Cold Weather Bunny Boots
14 Nylon Commando Wallet
155Nylon Commando Wallet
16 Nylon Commando Wallet
17 Nylon Commando Wallet
18 Nylon Commando Wallet
19 Nylon Commando Wallet
20 Nylon Commando Wallet
21 Pepper Sprays Gel Sabre Red
226Fire Master Fog Pepper Spray
236Pepper Sprays Gel Sabre Red
24 Pepper Sprays Gel Sabre Red
25 Pepper Sprays Gel Sabre Red
26 Pepper Sprays Gel Sabre Red
27 Key Chain Pepper Spray
288Pepper Sprays Gel Sabre Red
29 Cop Top Fog Cone Pepper Spray
309Flip Top Stream Pepper Spray
319Flip Top Cop Med Fog Cone Pepper Spray
3210Pepper Sprays Gel Sabre Red
33 Cop Top Stream Pepper Spray
3412Pepper Sprays Gel Sabre Red
35 Cop Top Fog Cone Pepper Spray
36 Flip Top Stream Pepper Spray
Sheet1
Cell Formulas
RangeFormula
A2=IF(COUNTIF($B1:B$2,B1)=1,COUNT($A$1:A0)+1,"")
A3=IF(COUNTIF($B$2:B2,B2)=1,COUNT($A$1:A1)+1,"")
A4=IF(COUNTIF($B$2:B3,B3)=1,COUNT($A$1:A2)+1,"")
A5=IF(COUNTIF($B$2:B4,B4)=1,COUNT($A$1:A3)+1,"")
A6=IF(COUNTIF($B$2:B5,B5)=1,COUNT($A$1:A4)+1,"")
A7=IF(COUNTIF($B$2:B6,B6)=1,COUNT($A$1:A5)+1,"")
A8=IF(COUNTIF($B$2:B7,B7)=1,COUNT($A$1:A6)+1,"")
A9=IF(COUNTIF($B$2:B8,B8)=1,COUNT($A$1:A7)+1,"")
A10=IF(COUNTIF($B$2:B9,B9)=1,COUNT($A$1:A8)+1,"")
A11=IF(COUNTIF($B$2:B10,B10)=1,COUNT($A$1:A9)+1,"")
A12=IF(COUNTIF($B$2:B11,B11)=1,COUNT($A$1:A10)+1,"")
A13=IF(COUNTIF($B$2:B12,B12)=1,COUNT($A$1:A11)+1,"")
A14=IF(COUNTIF($B$2:B13,B13)=1,COUNT($A$1:A12)+1,"")
A15=IF(COUNTIF($B$2:B14,B14)=1,COUNT($A$1:A13)+1,"")
A16=IF(COUNTIF($B$2:B15,B15)=1,COUNT($A$1:A14)+1,"")
A17=IF(COUNTIF($B$2:B16,B16)=1,COUNT($A$1:A15)+1,"")
A18=IF(COUNTIF($B$2:B17,B17)=1,COUNT($A$1:A16)+1,"")
A19=IF(COUNTIF($B$2:B18,B18)=1,COUNT($A$1:A17)+1,"")
A20=IF(COUNTIF($B$2:B19,B19)=1,COUNT($A$1:A18)+1,"")
A21=IF(COUNTIF($B$2:B20,B20)=1,COUNT($A$1:A19)+1,"")
A22=IF(COUNTIF($B$2:B21,B21)=1,COUNT($A$1:A20)+1,"")
A23=IF(COUNTIF($B$2:B22,B22)=1,COUNT($A$1:A21)+1,"")
A24=IF(COUNTIF($B$2:B23,B23)=1,COUNT($A$1:A22)+1,"")
A25=IF(COUNTIF($B$2:B24,B24)=1,COUNT($A$1:A23)+1,"")
A26=IF(COUNTIF($B$2:B25,B25)=1,COUNT($A$1:A24)+1,"")
A27=IF(COUNTIF($B$2:B26,B26)=1,COUNT($A$1:A25)+1,"")
A28=IF(COUNTIF($B$2:B27,B27)=1,COUNT($A$1:A26)+1,"")
A29=IF(COUNTIF($B$2:B28,B28)=1,COUNT($A$1:A27)+1,"")
A30=IF(COUNTIF($B$2:B29,B29)=1,COUNT($A$1:A28)+1,"")
A31=IF(COUNTIF($B$2:B30,B30)=1,COUNT($A$1:A29)+1,"")
A32=IF(COUNTIF($B$2:B31,B31)=1,COUNT($A$1:A30)+1,"")
A33=IF(COUNTIF($B$2:B32,B32)=1,COUNT($A$1:A31)+1,"")
A34=IF(COUNTIF($B$2:B33,B33)=1,COUNT($A$1:A32)+1,"")
A35=IF(COUNTIF($B$2:B34,B34)=1,COUNT($A$1:A33)+1,"")
A36=IF(COUNTIF($B$2:B35,B35)=1,COUNT($A$1:A34)+1,"")


Strange behavior and I need all the same text with the same number please.
 
Upvote 0
How did you even get it to take A0 as a reference?

Your first formula is wrong however, it should be:
=IF(COUNTIF($B$2:B2,B2)=1,COUNT($A$1:A1)+1,"")

Copy down.
 
Upvote 0
How did you even get it to take A0 as a reference?

I wondered about that to.

It turns out the A0 translates to #NAME? error

So it goes like
=IF(COUNTIF($B1:B$2,B1)=1,COUNT($A$1:A0)+1,"")
=IF(COUNTIF($B1:B$2,B1)=1,COUNT($A$1:#NAME?)+1,"")
=IF(COUNTIF($B1:B$2,B1)=1,COUNT(#NAME?)+1,"")
=IF(COUNTIF($B1:B$2,B1)=1,0+1,"")
=IF(COUNTIF($B1:B$2,B1)=1,1,"")

You can even put
=A0
directly into a cell and it will allow it, but returns #NAME?
 
Upvote 0
Thank you, when I put the formula in the A1 position cell I get the results almost like I need. I need the numbers to fill in all IDENTICAL B cell


Cell Formulas
RangeFormula
A1ID
A21
A31
A42
A52
A62
A72
A83
A93
A103
A113
A123
A133
A144
A154
A164
A174
A184
A194
A204
A215
A226
A277
A298
A309
A3110
A3311
A4112
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
 
Upvote 0
Thank you, when I put the formula in the A1 position cell I get the results almost like I need. I need the numbers to fill in all IDENTICAL B cell

The formula goes in A2

IN A2, put
=IF(COUNTIF($B$2:B2,B2)=1,COUNT($A$1:A1)+1,"")
Then filled down.
 
Upvote 0
This doesn't give me all the same number for Identical strings in B Column.
 
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