Todd Bardoni
Well-known Member
- Joined
- Aug 29, 2002
- Messages
- 3,042
What is everyone's opinion on the following. Often, I have to loop through large amounts of data inserting, say, formulas to the last row. I'm trying to figure what is overall best to use. I've been using something such as the following:
MyRegion=Sheet1.Cells.CurrentRegion.Rows
MyRows=MyRegion.Count
But, now I'm thinking for numerous reasons that this isn't so good. It might not select the entire range due to blank rows or columns, I think its kind of slow, etc.
Would it be better to use:
For Each ThisCell2 In ActiveSheet.Range("F1:F" & Range("F65536").End(xlUp).Row) (courtesy of phantom1975)
Just wondering.
MyRegion=Sheet1.Cells.CurrentRegion.Rows
MyRows=MyRegion.Count
But, now I'm thinking for numerous reasons that this isn't so good. It might not select the entire range due to blank rows or columns, I think its kind of slow, etc.
Would it be better to use:
For Each ThisCell2 In ActiveSheet.Range("F1:F" & Range("F65536").End(xlUp).Row) (courtesy of phantom1975)
Just wondering.