Loop through ranges columns

  • Thread starter Thread starter hotherps
  • Start date Start date
H

hotherps

I'm using a For next loop to determine the number of rows and columns m
code should run in.

What If I have multiple ranges of columns that need to be ru
indepenedently. Let's say A:K then L:R then S:Z with the rows at
constant of 1 to 100

For Each Cell in Range ("A:K") ??How do I state the next range?

Does there need to be a Loop at the bottom of the code?


Thanks:confused
 
I don't understand what you're doing but this is how you would get one For
loop to operate on those 3 ranges.
Do something like this:
Dim i as Range
Set TheWholeRng=Union(Range("A1:K100"),Range
("L1:R100"),Range("S1:Z100"))
For Each i In TheWholeRng
'What you want to do with each cell
Next i
 
Back
Top