detecting the first blank row in the spreadsheet and populate the blank row with data

R

racerrunner

hi to all,

i'm writting a marco to populate the row and col in the spreadsheet. I
provide an form interface for the user to key in the data before
reflect the data in the spreadsheet. my question is how do i detect the
first blank row and transfer the data into that blank row in the
spreadsheet.

i only have 9 columns and therefore i hardcode the colum, however, i
need to find the blank rows so as to insert the data.

Cells(currentRow, 1) = txtTime.Text
Cells(currentRow, 2) = txtDate.Text

can someone tell me how to fiind the index of the rows???????

Thank in advance
 
N

Norman Jones

Hi RaceRunner,

Assuming that column A can be used to determine the blank row, try:

Dim FirstBlankRow As Long

FirstBlankRow = Cells(Rows.Count, "A").End(xlUp)(2).Row



---
Regards,
Norman



"racerrunner" <[email protected]>
wrote in message
news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top