I am trying to loop through the rows in a selected range.
This works fine if the range is continuous. However, if the range is discontinous e.g.Sheet1!$A$8,Sheet1!$A$10:$A$12 which it will more than likely be for this task, when I pass the range object to another procedure it seems to contain only the first cell.
I’m looping through the rows like so:
For n = 1 To Rng.Rows.Count
Debug.Print Rng.Cells(n, 1)
Next n
but using the example range above, it thinks it only has one row.
After selecting the range I have coloured the cells using MyRng.Interior.ColorIndex = 6 and written the correct address to a text box on a form using MyRng.Address(False, False) so the range object is what I think it should be at that point.
Any thought?