Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 17th, 2003, 04:34 AM
Registered User
 
Join Date: Nov 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default to turn Calculation OFF for all except one column

Hi the experts,

I have a data worksheet ranging from column A to CR and covering 5200 rows. I have maintained a few columns in between with Sumproduct and If(Countif()) formulas.

Whenever I insert a new column, say column K and vlookup for values in other worksheets, the calculation takes very long and at times just hang.
How do I turn Calculation ON for only the active column (column K) and turn Calculation manually OFF for the rest of the columns ?

I would be most grateful if someone can help me with a code to solve this.

Thank you so much in advance!


 
Old December 17th, 2003, 09:01 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 132
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If your are just concerned about the amount of time it takes to insert the column, then you can set Calculation to Manual (Tools|Options|Calculation). Then insert your column, and either set Calculation back to Automatic, or Press F9 (recalc) or shift-F9 (recalc current worksheet only). Obviously, you don't have to do this instantly, particularly if you have more alterations to make, just remember to do it before you use any numbers :)
If you are trying to do this through code, then use
Code:
Application.Calculation = xlManual
...stuff...
Application.Calculation = xlAutomatic
HTH

Chris



There are two secrets to success in this world:
1. Never tell everything you know





Similar Threads
Thread Thread Starter Forum Replies Last Post
Search - Turn Off All Sites druk BOOK: Beginning SharePoint 2007: Building Team Solutions with MOSS 2007 ISBN: 978-0-470-12449-9 1 December 18th, 2007 12:49 PM
How to perform calculation on datagrid column valu Giri C# 1 August 16th, 2006 06:32 AM
cookie turn off swagatika ASP.NET 1.0 and 1.1 Basics 2 March 15th, 2006 09:25 AM
How can I turn off Warning information? Brian263 Access 2 March 23rd, 2004 09:11 AM
Turn a table on its side nbryson SQL Language 12 August 20th, 2003 08:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.