This should be pretty simple, I'm just struggling with it:
So I'm trying to make a loop that takes all of the values in column "x" and creates a named array with the value in x1. I'm running into trouble with using the variable x as a means of defining the column in the range. Advice?
Sub coding() Dim x As Integer, hed As String With Worksheets("Sheet1") x = 1 Do Until .Cells(x, 1).Value = "" hed = .Cells(x, 1).Value ThisWorkbook.Names.Add Name:=hed, RefersTo:=Worksheets("Sheet1").Range(x & "1" & x & 100) x = x + 1 Loop End With End Sub
Bookmarks