I'm implementing a questionnaire with 45 items in excel, called UPPS.
I need a vba code to name 45 cells (45 items of the UPPS) in the first row of sheet1 as follows, Cell A1 = upps_1, B1 = upps_2, C1 = upps_3 .... upps_45.
I' m quite sure this have an obvious solution (and simple?), but after a couple of hours searching the net and tweaking a lot of codes, no luck.....
Any help would be appreciated!
The closest match is this code below, but it named the cells in COLUMN A with correct names, but I need the cells to be names in a row (horisontal).
________________________
Sub NameCellsColumns()
'how to name row, not colomns?
Dim i As Long
Dim rng As Range
For i = 1 To 45
Set rng = Range("A" & i)
rng.Name = "upps_" & i
Next i
End Sub
Bookmarks