+ Reply to Thread
Results 1 to 3 of 3

Find second blank row

  1. #1
    Registered User
    Join Date
    08-17-2005
    Posts
    27

    Find second blank row

    Can someone edit this so that it will find the second blank row instead of the first blank row? Thanks


    Function FindBlankRow()
    x = 2
    Do While ActiveSheet.Cells(x, 1) <> ""
    x = x + 1
    Loop
    FindBlankRow = x - 1

  2. #2
    Bob Umlas
    Guest

    Re: Find second blank row

    Function FindBlankRow() As Integer
    Dim First As Boolean
    First = True
    For i = 1 To Rows.Count
    If IsEmpty(Cells(i, 1)) Then
    If First Then
    First = False
    Else
    FindBlankRow = i
    Exit Function
    End If
    End If
    Next i
    End Function

    Bob Umlas

    "singlgl1" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Can someone edit this so that it will find the second blank row instead
    > of the first blank row? Thanks
    >
    >
    > Function FindBlankRow()
    > x = 2
    > Do While ActiveSheet.Cells(x, 1) <> ""
    > x = x + 1
    > Loop
    > FindBlankRow = x - 1
    >
    >
    > --
    > singlgl1
    > ------------------------------------------------------------------------
    > singlgl1's Profile:
    > http://www.excelforum.com/member.php...o&userid=26389
    > View this thread: http://www.excelforum.com/showthread...hreadid=488365
    >




  3. #3
    Registered User
    Join Date
    08-17-2005
    Posts
    27
    thanks, I'll give it a try!

+ 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