Your technology certification is waiting. Enroll in Cloud Class ®
Dim r As Range
For Each r In Range("A2", Range("A2").End(xlDown))
r.Offset(, 1).Name = "Customer_" & r
Open in new window
Dim WS As Worksheet, rCell As Range
Set WS = ThisWorkbook.Sheets("Sheet1")
For Each rCell In WS.Range("A2", WS.Cells(WS.Rows.Count, 1).End(xlUp))
If NameExists("Customer_" & rCell.Value) = False Then
rCell.Offset(0, 1).Name = "Customer_" & rCell.Value
Function NameExists(sRangeName As String) As Boolean
On Error Resume Next
NameExists = Len(ThisWorkbook.Names(sRangeName).Name) <> 0
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
This course will introduce you to C++ 11 and teach you about syntax fundamentals.