Hi There,
I am fairly new to VB, so please bear with me. I am having trouble counting rows of Data in my worksheet. I don't want to know how many rows are in my selection, or how many rows are in my worksheet, but I want to know exactly the row number where my last data cell appears. Here's a quick example. I have 26 entries of data, but the last entry is in row 30. I would like to implement something that would return 30 to me.
I was also wondering if I can iterate through columns in a specific row. What I wanted to know was if I could do this:
Set rowArray = ActiveWorkbook.Worksheets(1).Rows
For each rowArray
'This will access the 5th column in the current row
rowArray(5).Value
Next
Any guidance would be greatly appreciated.
Thanks,
Nik
I am fairly new to VB, so please bear with me. I am having trouble counting rows of Data in my worksheet. I don't want to know how many rows are in my selection, or how many rows are in my worksheet, but I want to know exactly the row number where my last data cell appears. Here's a quick example. I have 26 entries of data, but the last entry is in row 30. I would like to implement something that would return 30 to me.
I was also wondering if I can iterate through columns in a specific row. What I wanted to know was if I could do this:
Set rowArray = ActiveWorkbook.Worksheets(1).Rows
For each rowArray
'This will access the 5th column in the current row
rowArray(5).Value
Next
Any guidance would be greatly appreciated.
Thanks,
Nik