+ Reply to Thread
Results 1 to 4 of 4

Finding the last non bank cell in a column

  1. #1
    Andrew B
    Guest

    Finding the last non bank cell in a column

    Hi
    Hopefully a simple question - how do you find the last non blank cell in
    a column ? The trick is that the column may contain blank cells along
    the way before reaching the last non blank cell.

    TIA
    Andrew Bourke

  2. #2
    Registered User Ivan F Moala's Avatar
    Join Date
    10-25-2003
    Location
    Auckland, New Zealand
    Posts
    71
    something like

    LastCellInColumnA = Range("A65536").End(xlUp).Offset(1, 0).Address

    Just subst the column ......
    Kind Regards,
    Ivan F Moala From the City of Sails
    \1

  3. #3
    Toppers
    Guest

    RE: Finding the last non bank cell in a column

    Hi,

    lastrow = Cells(Rows.Count, "A").End(xlUp).Row ' Last row in column A
    lastcell = Cells(lastrow, "A")


    HTH

    "Andrew B" wrote:

    > Hi
    > Hopefully a simple question - how do you find the last non blank cell in
    > a column ? The trick is that the column may contain blank cells along
    > the way before reaching the last non blank cell.
    >
    > TIA
    > Andrew Bourke
    >


  4. #4
    Nigel
    Guest

    Re: Finding the last non bank cell in a column

    Here is an approach for last row and last column.

    Dim lrow As Long, lcol As Integer

    ' last row of non-empty cell in column 1
    lrow = Cells(Rows.Count, 1).End(xlUp).Row

    'last column of non-empty cell in row 1
    lcol = Cells(1, Columns.Count).End(xlToLeft).Column

    --
    Cheers
    Nigel



    "Andrew B" <[email protected]> wrote in message
    news:[email protected]...
    > Hi
    > Hopefully a simple question - how do you find the last non blank cell in
    > a column ? The trick is that the column may contain blank cells along
    > the way before reaching the last non blank cell.
    >
    > TIA
    > Andrew Bourke




+ 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