+ Reply to Thread
Results 1 to 8 of 8

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

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

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

    Hi all,

    I'm using a macro that among other things, starting from the actual selected activecell, goes to the next empty visible row after apply a filter selection.

    I was using this code

    Please Login or Register  to view this content.
    which worked fine, but the thing is that the database now is more much bigger than before (up to 1000 rows) and now it goes veeeeeeeeeeeeeeery slowly to look for the next empty visible row.

    So, I know that in order to speed up this process, I should use something like this:

    Please Login or Register  to view this content.
    But this code doesn't work as expected. It doesn't respect the activecell and goes directly to A1 cell. So, do you know please a way to speed up to go to next empty visible row?


    For better understanding: if my activecell is F12 and after apply the filter, the next empty visible row is in F520, I want the cursor to go to F520.


    Thank you in advance for your help and I wish you all a nice Christmas holidays and happy and hopefully better year 2021!
    Last edited by thorblow; 12-30-2020 at 08:34 AM.

  2. #2
    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

    Try this...
    Please Login or Register  to view this content.
    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.

  3. #3
    Registered User
    Join Date
    12-29-2020
    Location
    Viet Nam
    MS-Off Ver
    365
    Posts
    13

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

    Hi, try this one (column E); a is a variable.

    a=Activesheet.Cells(1, "E").End(xlDown).Row + 1

  4. #4
    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

    Hi AlphaFrog!

    It worked perfectly! Thank you so much!

    Now I'm curious... how exactly works the part of "xlValues, , , 1)"? what is the meaning of each comma and the number?

    I'm asking because I have a keypad in this Excel, and when pressing the arrow "up" runs this code:

    Please Login or Register  to view this content.

    So, is there a way to use the same code you sent me, but instead of going to the next down cell, going to the upper next cell?

  5. #5
    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

    Hi hhhle, I just have used the AlphaFrog code and it was perfect! Thanks anyway for your proposal!

  6. #6
    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

    OK, in order to go up, I just did it my way and it works :D

    Please Login or Register  to view this content.
    Thanks you all!

  7. #7
    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...

    Please Login or Register  to view this content.
    How it works...
    The .Find method

    Or select Find in your code and press F1 for help.

  8. #8
    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

    Please Login or Register  to view this content.
    GO UP:


    Please Login or Register  to view this content.
    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