Results 1 to 10 of 10
  1. #1
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Detect Last Non-blank Row

    Hey.. I could have sworn I saw an entry on this here already, but I must be blind.. does anyone know how I can do this? Ideally, I would return the row number of the last non-blank row...

    Thanks in advance!

    Drk.
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  2. #2
    Star Lounger
    Join Date
    Feb 2001
    Location
    Auckland, North Island, New Zealand
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Detect Last Non-blank Row

    Range("D8").Select 'starting cell
    Selection.End(xlDown).Select'last row before a blank cell
    MsgBox Selection.Row 'returns the row number

    Hope this helps

  3. #3
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Detect Last Non-blank Row

    Thanks Simon!

    The problem is, the last row is constantly changing... any ideas?
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  4. #4
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Detect Last Non-blank Row

    How about:

    Range("D69000").Select
    Selection.End(xlup).Select
    MsgBox Selection.Row 'returns the row number

  5. #5
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Detect Last Non-blank Row

    Worked like a charm.. Thanks again cpod! )
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  6. #6
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    NJ, USA
    Posts
    239
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Detect Last Non-blank Row

    Also check out the following site. I think something like the described function would be needed if the last cell could be in *any* column...

    http://www.beyondtechnology.com/geeks012.shtml

    Don't think the above is going to be a hyperlink(?). If not, how do you do that?

  7. #7
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Detect Last Non-blank Row

    type the following:
    [ url= ***URL HERE*** ] Hyperlink Text Here [ /url ]

    Just remove the spaces, and there you go.

    Drk.
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  8. #8
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Detect Last Non-blank Row

    Bravo!! [img]/w3timages/icons/smile.gif[/img]

    You can kinda recognize the formats in the tag panel on the right of your composition window... just hold your mouse over them for a few secs.. [img]/w3timages/icons/wink.gif[/img]

    Drk.
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  9. #9
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    NJ, USA
    Posts
    239
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Detect Last Non-blank Row

    here goes:

    Click HERE for the link mentioned above.

    Thanks.

  10. #10
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Detect Last Non-blank Row

    Sorry, a little bit late,
    You were right about that thread:
    http://x69.deja.com/threadmsg_ct.xp?...83.1&mhitnum=0

Posting Permissions

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