+ Reply to Thread
Results 1 to 8 of 8

Starting from the actual activecell, go to the next empty visible row

Hybrid View

  1. #1
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: Starting from the actual activecell, go to the next empty visible row

    Up...

    ActiveCell.EntireColumn.Find("", ActiveCell, xlValues, , , 2).Select
    How it works...
    The .Find method

    Or select Find in your code and press F1 for help.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  2. #2
    Registered User
    Join Date
    02-19-2018
    Location
    Czech Republic
    MS-Off Ver
    Excel 2016
    Posts
    68

    Re: Starting from the actual activecell, go to the next empty visible row

    Thanks AlphaFrog!

    I even now have found another method that better covers my needs. I just leave it here in case could help somebody:

    GO DOWN

    Sub down ()
    Dim startTime As Date
    
            startTime = Now
    
            
                ActiveCell.Offset(1, 0).Select
    Do Until ActiveCell.EntireRow.Hidden = False
    ActiveCell.Offset(1, 0).Select
    
    
                If DateDiff("s", startTime, Now) > 0.5 Then
    ActiveCell.End(xlDown).Select
                    Exit Do
                End If
    
     Loop
    
    End sub
    GO UP:


    Sub Up ()
    Dim startTime As Date
    
            startTime = Now
    
            
                ActiveCell.Offset(-1, 0).Select
    Do Until ActiveCell.EntireRow.Hidden = False
    ActiveCell.Offset(-1, 0).Select
    
    
                If DateDiff("s", startTime, Now) > 0.5 Then
    ActiveCell.End(xlup).Select
                    Exit Do
                End If
    
     Loop
    
    End sub
    Is basically the same code I had, but now I have added a condition that when the loop takes more than 0.5 seconds, stops the loop and goes directly to the next empty visible row

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. difference in between activecell.activate and activecell.select
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2020, 03:14 AM
  2. How to Calculate actual date when starting date and months is given?
    By ulala2 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-04-2015, 03:38 AM
  3. [SOLVED] Macro to scroll to activecell and make visible in middle of screen
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-27-2015, 02:38 PM
  4. [SOLVED] Autofill text starting at the ActiveCell
    By canadian_chickie in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-10-2012, 03:55 PM
  5. export a calculation to excel so that the actual numbers and answer are visible
    By Sean Loughran in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-18-2012, 03:04 PM
  6. Output contents of Activecell when Activecell may be string or numeric.
    By jfriddle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2012, 12:27 PM
  7. Paste Multiple listbox items starting at ActiveCell
    By Casey in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-08-2006, 02:45 PM

Tags for this Thread

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