Hi, what would be the best way to count the number of rows (with data) in a spreadsheet? Currently, I use:
'First 4 rows are headers and misc data
Do
rowcount = rowcount + 1
Loop Until MySheet.Cells(rowcount + 4, 1).Value = ""
rowcount + 3 'Return correct number of rows
Problem is, this method is horribly horribly slow, and it was okay while their were only a few rows, but when start getting a lot, the PC will just start hanging while it works it all out. I've seen reference to a 'Count' object, but I could only find it reffered to as returning the number of open workbooks, which wasn't much use :\ - Any help appericated guys!.
Joseph.
'First 4 rows are headers and misc data
Do
rowcount = rowcount + 1
Loop Until MySheet.Cells(rowcount + 4, 1).Value = ""
rowcount + 3 'Return correct number of rows
Problem is, this method is horribly horribly slow, and it was okay while their were only a few rows, but when start getting a lot, the PC will just start hanging while it works it all out. I've seen reference to a 'Count' object, but I could only find it reffered to as returning the number of open workbooks, which wasn't much use :\ - Any help appericated guys!.
Joseph.