+ Reply to Thread
Results 1 to 3 of 3

Visual Basic code to find next available (blank) row in a spreadsh

  1. #1
    TB
    Guest

    Visual Basic code to find next available (blank) row in a spreadsh

    This may be basic VB code but I need to write a code that will find the next
    available blank row in a spreadsheet. Once I find it, I need additional code
    to reference this particular row but not by row #. I will be locating the
    next available blank row, adding data to this row and then graphing it. I
    will need to know how to reference the newly identified row each month so the
    code cannot be fixed (e.g., if I identify row 20 this month, it will not be
    available next month because I will be appending the same file each month).
    Any help would be greatly appreciated!

  2. #2
    Tom Ogilvy
    Guest

    Re: Visual Basic code to find next available (blank) row in a spreadsh

    If column A can be used to make the determination

    Dim rng as Range
    set rng = Cells(rows.count,1).End(xlup).Offset(1,0)

    --
    Regards,
    Tom Ogilvy

    "TB" <TB@discussions.microsoft.com> wrote in message
    news:7BA50427-0655-47E2-894F-B0AC375204E4@microsoft.com...
    > This may be basic VB code but I need to write a code that will find the

    next
    > available blank row in a spreadsheet. Once I find it, I need additional

    code
    > to reference this particular row but not by row #. I will be locating the
    > next available blank row, adding data to this row and then graphing it. I
    > will need to know how to reference the newly identified row each month so

    the
    > code cannot be fixed (e.g., if I identify row 20 this month, it will not

    be
    > available next month because I will be appending the same file each

    month).
    > Any help would be greatly appreciated!




  3. #3
    TB
    Guest

    Re: Visual Basic code to find next available (blank) row in a spre

    Thanks, Tom. That got me started in the right direction and I was able to
    complete the code.

    "Tom Ogilvy" wrote:

    > If column A can be used to make the determination
    >
    > Dim rng as Range
    > set rng = Cells(rows.count,1).End(xlup).Offset(1,0)
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "TB" <TB@discussions.microsoft.com> wrote in message
    > news:7BA50427-0655-47E2-894F-B0AC375204E4@microsoft.com...
    > > This may be basic VB code but I need to write a code that will find the

    > next
    > > available blank row in a spreadsheet. Once I find it, I need additional

    > code
    > > to reference this particular row but not by row #. I will be locating the
    > > next available blank row, adding data to this row and then graphing it. I
    > > will need to know how to reference the newly identified row each month so

    > the
    > > code cannot be fixed (e.g., if I identify row 20 this month, it will not

    > be
    > > available next month because I will be appending the same file each

    > month).
    > > Any help would be greatly appreciated!

    >
    >
    >


+ 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