+ Reply to Thread
Results 1 to 3 of 3

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

  1. #1
    Registered User
    Join Date
    05-14-2006
    Posts
    2

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

    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
    Last edited by racerrunner; 05-14-2006 at 12:42 AM.

  2. #2
    Norman Jones
    Guest

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

    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]...
    >
    > 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
    >
    >
    > --
    > racerrunner
    > ------------------------------------------------------------------------
    > racerrunner's Profile:
    > http://www.excelforum.com/member.php...o&userid=34415
    > View this thread: http://www.excelforum.com/showthread...hreadid=541895
    >




  3. #3
    Registered User
    Join Date
    05-14-2006
    Posts
    2

    Thank You Norman

    Hi Norman,

    Thank you for your help. It works prefectly. Thank you very much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1