+ Reply to Thread
Results 1 to 3 of 3

Select last cell containing data greater than 0

  1. #1
    Registered User
    Join Date
    05-10-2006
    Posts
    7

    Select last cell containing data greater than 0

    Hi there,
    How do I create a macro to select the last cell in a column containing data that is greater than zero. The column also consists of zero's and blanks.
    Thanks in advance

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    try this out, set the range to start wherever you want, it starts at the bottom and works its way up until there is a value greater than zero

    Sub Button1_Click()
    Application.ScreenUpdating = False
    Range("A200").Select
    Do Until Selection.Value > 0

    ActiveCell.Offset(-1, 0).Range("A1").Select
    Loop

    End Sub

  3. #3
    Forum Contributor
    Join Date
    08-27-2006
    Posts
    136
    This should prove faster as the cell value is checked without selecting.

    Please Login or Register  to view this content.

+ 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