S
spence
i have a database of records starting with A5. A5
contains the title of the first record. the range of
data for this record is C59. the next records' title
is in A10. this record has 5 lines, going from C1014.
i have a formula that puts the range for the first record
in F5. so F5 = "C59". and the desired name for this
record is in G5. so G5 = "DESIRED RANGE NAME" obviously
each range has a different name. i have this:
Sub NameOptionRanges()
Dim CellF As Range
Dim CellG As Range
For Each CellF In Range("F5:F1000")
If CellF <> "" Then
For Each CellG In Range("G5:G1000")
If CellG <> "" Then
Range(CellF).Select
Range(CellF).Name = CellG.Value
End If
Next
End If
Next
End Sub
but i can't quite figure out how to make the loops work
right. i want to name the range which is in column F,
with the name located exactly one cell to the right of it
in column G. TIA
contains the title of the first record. the range of
data for this record is C59. the next records' title
is in A10. this record has 5 lines, going from C1014.
i have a formula that puts the range for the first record
in F5. so F5 = "C59". and the desired name for this
record is in G5. so G5 = "DESIRED RANGE NAME" obviously
each range has a different name. i have this:
Sub NameOptionRanges()
Dim CellF As Range
Dim CellG As Range
For Each CellF In Range("F5:F1000")
If CellF <> "" Then
For Each CellG In Range("G5:G1000")
If CellG <> "" Then
Range(CellF).Select
Range(CellF).Name = CellG.Value
End If
Next
End If
Next
End Sub
but i can't quite figure out how to make the loops work
right. i want to name the range which is in column F,
with the name located exactly one cell to the right of it
in column G. TIA