Creating cell names from cell contents en masse

J

John

I'm attempting to apply unique cell names for 30,000 individual cells.
The cell names are easily propogated in cells, but I'm stuck on how to
efficiently transfer this info to the cell names. I've searched the
archives but haven't had any luck finding a shortcut! Help!
 
S

Simon Lloyd

John;346074 said:
I'm attempting to apply unique cell names for 30,000 individual cells.
The cell names are easily propogated in cells, but I'm stuck on how to
efficiently transfer this info to the cell names. I've searched the
archives but haven't had any luck finding a shortcut! Help!If you really want to name 30,000 cells and heaven knows why you would!
you can use this code, this assumes the cells all have entries that will
be their individual name and that there aren't any duplicates:

Code:
--------------------
Sub NameCells()
Dim cell As Range
For Each cell In Range("A1:A100")
cell.Name = cell.Value
Next cell
End With
End Sub
--------------------


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top