Biff Malibu 636
New Member
- Joined
- Mar 15, 2017
- Messages
- 8
Hello, and thank you for taking the time to read and help me with what is probably a simple issue, but I can't seem to figure it out. I have a script of code I'd like to run on several named ranges (a ranking feature). My question is how do I take a list of named ranges and loop through them. My sheet looks like this:
I would like to run the following script of code on "US Sectors Continued"
thank you for any help!
regards,
Tony
I would like to run the following script of code on "US Sectors Continued"
VBA Code:
Sub ADD_RANKS()
'need to learn how to loop through named ranges
Dim cell As Range
Dim i As Integer
i = 1
For Each cell In Range("EUROPEAFRICA")
If cell.Column = 1 Then
cell.Offset(0, 2).Value = i
i = i + 1
End If
Next
End Sub
regards,
Tony