Ann_BBO
07-27-2007, 07:46 PM
Basically, i am not sure that the actual operation between xlup and xldown.
Dim Source As Range
Dim Rng As Range
Dim c As Range
Set c =Source.Range("A3")
If Rng Is Nothing Then Set Rng = c.Offset(1)
Set Rng = Union(Rng, Range(c.Offset(1), c.Offset(1).End(xlDown)))
Set c = c.Offset(1).End(xlDown).Offset(1)
To my know, if c=A3, then Rng=A4. Therefore,
Range(c.Offset(1), c.Offset(1).End(xlDown)) =The rectangle area from A4 to H30 where A4:H30 has the value or until ,say, Row 31 is space area and "I" column is space.
Is it correct or not. I am confused that between xlup and xldown.
Moreover, "Union" is it the array to store the same type data.
Thanks
Dim Source As Range
Dim Rng As Range
Dim c As Range
Set c =Source.Range("A3")
If Rng Is Nothing Then Set Rng = c.Offset(1)
Set Rng = Union(Rng, Range(c.Offset(1), c.Offset(1).End(xlDown)))
Set c = c.Offset(1).End(xlDown).Offset(1)
To my know, if c=A3, then Rng=A4. Therefore,
Range(c.Offset(1), c.Offset(1).End(xlDown)) =The rectangle area from A4 to H30 where A4:H30 has the value or until ,say, Row 31 is space area and "I" column is space.
Is it correct or not. I am confused that between xlup and xldown.
Moreover, "Union" is it the array to store the same type data.
Thanks