I have the following code and it works well, however, I'd like to loop through a cell range and name the cells in the range with the cell value:
Sub NameCell()
Range("A2").Name = Range("A2").Value
End Sub
I have the following code and it works well, however, I'd like to loop through a cell range and name the cells in the range with the cell value:
Sub NameCell()
Range("A2").Name = Range("A2").Value
End Sub
Give this a try:
Sub NameMaker()
For Each r In Selection
With r
.Name = .Value
End With
Next r
End Sub