vba Loop over a non-contiguous range
- by Jeffrey
I have a non-contiguous range on rows (example address of myRange: $2:$2,$4:$205,$214:$214) and I would like to access a specific row and column within the range. I have tried the following:
'Get the value of the 2nd row, 1st column within the range
myRange.rows(2).Cells(, 1).Value
However, this is giving me the value of the 2nd row in the WorkSheet, and NOT in the range - meaning it is giving me address $3$1 - and not $4$1
Can someone please explain how I can access the values within in my range? (It may have to do with different areas)
Thank You