+ Reply to Thread
Results 1 to 6 of 6

Identifying last row number

  1. #1
    Maxi
    Guest

    Identifying last row number

    I have data in range A1 to A10. I want to find the first blank cell in
    column A which is at A11. Therefore the VBA should give result as 11.


  2. #2
    Harald Staff
    Guest

    Re: Identifying last row number

    http://www.contextures.com/xlfaqMac.html#Empty

    HTH. Best wishes Harald

    "Maxi" <[email protected]> skrev i melding
    news:[email protected]...
    >I have data in range A1 to A10. I want to find the first blank cell in
    > column A which is at A11. Therefore the VBA should give result as 11.
    >




  3. #3
    Bob Phillips
    Guest

    Re: Identifying last row number

    All you need is

    FirstEmptyRow = Range("A1").End(xlDown).Row + 1

    If you want the first blank cell after the last data cell where there may be
    embedded blanks, e.g. A3 and a4 may be blank, but A5 is not, then us

    EmptyRow = Cells(Rows.Count,"A").End(xlUp).Row + 1

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "Maxi" <[email protected]> wrote in message
    news:[email protected]...
    > I have data in range A1 to A10. I want to find the first blank cell in
    > column A which is at A11. Therefore the VBA should give result as 11.
    >




  4. #4
    Registered User
    Join Date
    08-05-2006
    Posts
    14
    Kind of similar to this, I was wondering how to find the last 5 non-blank items in a range (which just say I've called "TheRange")

  5. #5
    Bob Phillips
    Guest

    Re: Identifying last row number

    Are they contiguous? If so just use

    LastRow = Cells(Rows.Count,"A").End(xlUp).Row
    Set MyRange = Cells(LastRow,"A").Offset(-4,0).Resize(5)

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "godonnygo" <[email protected]> wrote
    in message news:[email protected]...
    >
    > Kind of similar to this, I was wondering how to find the last 5
    > non-blank items in a range (which just say I've called "TheRange")
    >
    >
    > --
    > godonnygo
    > ------------------------------------------------------------------------
    > godonnygo's Profile:

    http://www.excelforum.com/member.php...o&userid=37124
    > View this thread: http://www.excelforum.com/showthread...hreadid=568925
    >




  6. #6
    Maxi
    Guest

    Re: Identifying last row number

    Thanks Bob. Issue resolved


    Bob Phillips wrote:
    > Are they contiguous? If so just use
    >
    > LastRow = Cells(Rows.Count,"A").End(xlUp).Row
    > Set MyRange = Cells(LastRow,"A").Offset(-4,0).Resize(5)
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (replace somewhere in email address with gmail if mailing direct)
    >
    > "godonnygo" <[email protected]> wrote
    > in message news:[email protected]...
    > >
    > > Kind of similar to this, I was wondering how to find the last 5
    > > non-blank items in a range (which just say I've called "TheRange")
    > >
    > >
    > > --
    > > godonnygo
    > > ------------------------------------------------------------------------
    > > godonnygo's Profile:

    > http://www.excelforum.com/member.php...o&userid=37124
    > > View this thread: http://www.excelforum.com/showthread...hreadid=568925
    > >



+ 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