Sandra Smith
asked on
In range, name a single-cell range the text in the field to the right of the cell
I have various named ranges that, for example, go from N6:S22. However within this range, in the column Q, in each row in the range, the cell in column Q needs to be range-named the text that is in column R for that cell. For example, cell Q15 needs to be range-named what the text is in cell R22. So, i have a range names "ss_WAL" that is N6:S22, I need to loop through the Q6:Q22 cells and range-name them the values in R6:R22. All this must be done in VBA. I have the below but am not sure how to proceed.
With ThisWorkbook.Worksheets("Datasource").Range("ss_WAL")
.Cells(intCount, 4).AddComment Me.txtRangeName.Value 'Adds comment with range name
.Cells(intCount, 4).Name = .Cells(intCount, 5).text 'Defines the name of the range for the column number
End With
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It works perfectly. Now, am posting another related question on this top that extends what I need to do.
ASKER