+ Reply to Thread
Results 1 to 15 of 15

For Each Loop (Make it Faster)

Hybrid View

  1. #1
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: For Each Loop (Make it Faster)

    Hi,

    I would approach this by filtering the data, and then hiding the filtered rows:

    ActiveSheet.Range("$A$1:$A$30000").AutoFilter Field:=1, Criteria1:="<>hide", Operator:=xlAnd
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: For Each Loop (Make it Faster)

    Quote Originally Posted by sweep View Post
    Hi,

    I would approach this by filtering the data, and then hiding the filtered rows:

    ActiveSheet.Range("$A$1:$A$30000").AutoFilter Field:=1, Criteria1:="<>hide", Operator:=xlAnd
    if you've got 100 columns in the range though then arent you going to need to loop through the columns filtering in turn?
    If someone has helped you then please add to their Reputation

+ 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. [SOLVED] faster way to loop
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-22-2015, 12:09 PM
  2. [SOLVED] Make VBA Faster
    By icondor517 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-29-2013, 07:42 AM
  3. Is it possible to get rid of this loop to make the code faster?
    By mhw1129 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2011, 09:03 AM
  4. Make loop run faster
    By losmi8 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-20-2010, 01:11 AM
  5. Making a simple loop faster
    By gummi in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-23-2008, 07:07 PM
  6. can you make this faster?
    By John in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-25-2005, 04:05 PM
  7. [SOLVED] Faster For-Next Loop?
    By dgp@dodgeit.com in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-07-2005, 06:06 PM

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