1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Let excel calculate cells only once

Discussion in 'Business Applications' started by Saraal, Mar 15, 2010.

Thread Status:
Not open for further replies.
Advertisement
  1. Saraal

    Saraal Thread Starter

    Joined:
    Mar 5, 2010
    Messages:
    9
    Hi,

    I have a sheet in excel 2003, that has a table that gets its data from different files, and does calculations on it. The size (= amount of rows) of this table varies, so I use the code described here: http://www.vbaexpress.com/kb/getarticle.php?kb_id=512 to remove empty rows (the table is printed after the calculations are done, and having a half empty page before the rest of the text continues does not look nice, so leaving the rows empty is not realy an option). The problem is that the combination of the calculations and the VBA script to remove rows, is slowing my PC down considerably, since with each row that is removed, all calculations are repeated. Is there a way to force excell to only do the calculations the first time around? 1 round of calculations takes about 30 seconds, and it is usually repeated about 20 times (the amount of empty rows that is left after the calculations, which means that my computer is calculating for about 10 minutes, while this is completely unnessecary for my purposes.

    Thanks in advance,
    Saraal
     
  2. etaf

    etaf Moderator

    Joined:
    Oct 2, 2003
    Messages:
    65,203
    First Name:
    Wayne
    Application.Calculation = xlCalculationAutomatic 'it will change calculation to automatic
    Application.Calculation = xlCalculationManual 'it will change calculation to manual


    so you could add these to the VBA code to Turn to manual before you delete the rows and then turn back on to automatic at the end
     
  3. Saraal

    Saraal Thread Starter

    Joined:
    Mar 5, 2010
    Messages:
    9
    The sheets work great now, thanks!
     
  4. etaf

    etaf Moderator

    Joined:
    Oct 2, 2003
    Messages:
    65,203
    First Name:
    Wayne
    excellent (y) - thanks for letting us know
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/910210

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice