I've used this code to set up a batch of names ranges on a spreadsheet, but am not sure how I would change this to set the rage as a full row instead of just as a cell? any advice on how I should tweak this?
Code:
Sub rangerset()
Dim cell As Range
Dim rng As Range
Dim RangeName As String
Dim CellName As String
Dim p As Integer
Dim chk As String
p = 181
Do Until p = 398
RangeName = Sheets("input").Range("c" & p).value
chk = Sheets("input").Range("j" & p).value
'RangeName = "CkPG06a"
'CellName = "C190"
If chk = "x" Then
Set cell = Worksheets("Input").row("c" & p)
ThisWorkbook.Names.Add Name:=RangeName, RefersTo:=cell
End If
p = p + 1
Loop
End Sub