+ Reply to Thread
Results 1 to 10 of 10

Code running really slowly

Hybrid View

The Phil Code running really slowly 04-03-2014, 01:05 PM
Leith Ross Re: Code running really slowly 04-03-2014, 01:24 PM
The Phil Re: Code running really slowly 04-03-2014, 01:35 PM
romperstomper Re: Code running really slowly 04-03-2014, 01:29 PM
The Phil Re: Code running really slowly 04-03-2014, 01:41 PM
romperstomper Re: Code running really slowly 04-03-2014, 05:53 PM
jolivanes Re: Code running really slowly 04-03-2014, 07:00 PM
The Phil Re: Code running really slowly 04-03-2014, 07:24 PM
jolivanes Re: Code running really slowly 04-03-2014, 08:42 PM
The Phil Re: Code running really slowly 04-03-2014, 07:19 PM
  1. #1
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,692

    Re: Code running really slowly

    Just thinking out loud here.
    Would this work?
    Sub Try()
        With Range("E1:E8000")    '<---- Change as required
            .Replace 0, "", xlWhole
            .SpecialCells(4).EntireRow.Delete
        End With
    End Sub

  2. #2
    Forum Contributor
    Join Date
    02-24-2010
    Location
    BC, Canada
    MS-Off Ver
    Excel 2010
    Posts
    174

    Re: Code running really slowly

    Quote Originally Posted by jolivanes View Post
    Just thinking out loud here.
    Would this work?
    Sub Try()
        With Range("E1:E8000")    '<---- Change as required
            .Replace 0, "", xlWhole
            .SpecialCells(4).EntireRow.Delete
        End With
    End Sub
    I tried this on a sample sheet with 16 rows, 4 of which should have been deleted. It worked but it took over 30 seconds to run.

    It's looks like there's something wrong with the workbook itself. If I make a new workbook and run your script, then it works pretty much instantly....

  3. #3
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,692

    Re: Code running really slowly

    What kind of formulae do you have in the workbook?
    I had a similar problem years ago. Some functions recalculate whenever a change is made.
    I changed the culprits and the problem was solved.
    I personally don't know anything at all about these functions but if you post the formulae someone might be able to give you an alternative.

+ 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] Code running slowly
    By Sweepin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-30-2013, 09:15 PM
  2. [SOLVED] Code running slowly any way of speeding up processing time
    By boomboomblock in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-02-2013, 09:09 AM
  3. Code running slowly
    By rhudgins in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 02-01-2011, 11:08 AM
  4. Replies: 3
    Last Post: 11-24-2010, 03:43 AM
  5. Paste code running extremely slowly...
    By KR in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-03-2005, 11:05 AM

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