O
odie
My data is in several areas (contiguous cells) within a column. Blank
(empty) cells separate the areas. I would simply like to loop through each
range but I can't get the For each loop to work:
Data:
A
1 44.6
2 23.9
3 31.8
4
5 50.4
6 24.8
7
8 40.6
9 38.9
10 34.5
11 51.9
12 43.8
13
Dim c as range
For Each c In Worksheets("Master").Range("A1:A" & _
Worksheets("Master").Cells(Rows.Count, "A").End(xlUp).Row)
'do something for each range (area)
Next
What happens is the code loops through every single cell between A1 to the
last used cell in column A. I though it was supposed to loop by range NOT
cell....what gives????
Please help!!, Thanks in advance....
PS: I have tried using code to double check and verify the blank cells are
in fact empty but it did not make a difference.
(empty) cells separate the areas. I would simply like to loop through each
range but I can't get the For each loop to work:
Data:
A
1 44.6
2 23.9
3 31.8
4
5 50.4
6 24.8
7
8 40.6
9 38.9
10 34.5
11 51.9
12 43.8
13
Dim c as range
For Each c In Worksheets("Master").Range("A1:A" & _
Worksheets("Master").Cells(Rows.Count, "A").End(xlUp).Row)
'do something for each range (area)
Next
What happens is the code loops through every single cell between A1 to the
last used cell in column A. I though it was supposed to loop by range NOT
cell....what gives????
Please help!!, Thanks in advance....
PS: I have tried using code to double check and verify the blank cells are
in fact empty but it did not make a difference.