sickvisionz
New Member
- Joined
- Nov 7, 2014
- Messages
- 8
I have a spreadsheet with about 30 named ranges in it. I need to cycle through 10 of them and do with style process to each. I thought it would be easiest to make another named range called "tableList" that is a one column table with the names of the tables I need and access it something like this
The basic structure of the code would be
If the first name in tableList is "Jimmy" and the second is "Bob", the goal is that the code copies the first column in the named range called "Jimmy" onto the MASTERLIST. It goes to the next cell and copies the first column in the named "Bob" to the master list, etc.
I can't get this to work for the life of me. I can get something like it functional using for each [name variable] in Activeworkbook.Names but I don't need every named ranged to be processed like this, just specific ones.
The basic structure of the code would be
Code:
dim cell, temprange as Range
For Each cell in [tableList]
Set temprange = [cell] 'this is supposed to represent the string value in cell being used as a named range
With temprange
[I] with stuff you can do to a range[/I]
end With
Next cell
If the first name in tableList is "Jimmy" and the second is "Bob", the goal is that the code copies the first column in the named range called "Jimmy" onto the MASTERLIST. It goes to the next cell and copies the first column in the named "Bob" to the master list, etc.
I can't get this to work for the life of me. I can get something like it functional using for each [name variable] in Activeworkbook.Names but I don't need every named ranged to be processed like this, just specific ones.
Last edited: