F
FSPH
Hello there,
I would like to find the number of rows with data in it while going from top
to bottom of a worksheet.
This code does the trick:
lngLastUsedRowInColX = ActiveSheet.Cells(Rows.Count, ColX).End(xlUp).Row
However, I would like the count to be sensitive to a "blank" row (i.e.,
without any data in it). So, give me the last row count before a blank row.
Here is an example:
Row 1: 12
Row 2: 18
Row 3: 9
Row 4:
Row 5:
Row 6: 5
Row 7: 44
My code above returns "7 rows with data". However, I would like to have the
result "3 rows of code before the first "blank" row".
Any idea how I can achieve this, presumably by extending the code above?
Thank you.
By the way, this question is directly related to a previous questio
(http://www.microsoft.com/office/com...&p=1&tid=172b7524-f20b-401c-a5f4-bd178158ed6b)
I would like to find the number of rows with data in it while going from top
to bottom of a worksheet.
This code does the trick:
lngLastUsedRowInColX = ActiveSheet.Cells(Rows.Count, ColX).End(xlUp).Row
However, I would like the count to be sensitive to a "blank" row (i.e.,
without any data in it). So, give me the last row count before a blank row.
Here is an example:
Row 1: 12
Row 2: 18
Row 3: 9
Row 4:
Row 5:
Row 6: 5
Row 7: 44
My code above returns "7 rows with data". However, I would like to have the
result "3 rows of code before the first "blank" row".
Any idea how I can achieve this, presumably by extending the code above?
Thank you.
By the way, this question is directly related to a previous questio
(http://www.microsoft.com/office/com...&p=1&tid=172b7524-f20b-401c-a5f4-bd178158ed6b)