+ Reply to Thread
Results 1 to 5 of 5

Calculate after cell entry/auto filter change

  1. #1
    Registered User
    Join Date
    07-22-2010
    Location
    Oxford, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Post Calculate after cell entry/auto filter change

    I feel bad because this is my first post in the forum and its already about asking for help, sorry!. Never had any experience in writing VBA scripts so have not found any solutions/guides online that are coming to my aid.

    [Problem]
    I work in an IT department for a small company and one of my jobs it so solve random problems. The problem we have is that our finance department use excel 2003 for all there reports and tracking (they are finaly changing there system to opera soon). After nearly a year of inputing data onto there individual and joint excel sheets (some nearly 19mb) they are starting to respond really slow especialy when using the autofilters it takes ages to recalculate.

    [Workaround]
    I found a work around that involves turning off automatic calculation and pressing F9 to recalculate after the inputting has been done but the user (stubbon lady) does not want to do this as after she inputs a figure the cell next to it shows how much is outstanding.

    [Question]
    Would I be wrong in thinking a VBA script could be created to "press F9" after she has finished inputting into a cell? and to also calculate after the autofilter has finished filtering her choice?

    Would anyone be able to recommend me guides so I can create this or to help me with example code that you have avaliable.

    Yet again sorry to be asking for help on my first post but im stuck and trying to make a good impression in my 6 month contract so they offer me a permant job.
    Last edited by Drew Watson; 07-28-2010 at 07:27 AM. Reason: come up with a "fix" but this is my FIRST vba script! so be warned.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Calculate after cell entry/auto filter change

    It sounds as though these files are heaped full of Volatile functions (or functions Volatile by association), and/or masses of expensive Arrays / Sumproduct formulae and perhaps Conditional Formatting ?

    Altering calculation mode to Manual is IMO very much method of last resort - better to focus on the underlying cause of the slow calculation.

    In answer to your question - yes you can use VBA to enforce a calculation upon a cell being altered whilst on Manual mode (see Worksheet_Change event) but I don't think that's really the best course of action... but to reiterate that's just m y opinion.

    For more info. on Volatility and optimisation per se see the link in my sig.

  3. #3
    Registered User
    Join Date
    07-22-2010
    Location
    Oxford, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Calculate after cell entry/auto filter change

    Quote Originally Posted by DonkeyOte View Post
    Altering calculation mode to Manual is IMO very much method of last resort - better to focus on the underlying cause of the slow calculation.
    Thank you for your reply.

    I completely agree but luckly they are chaning to a new finance package soon. We have no expert/experience excel people in the company to make these changes and with it being so late in the financial year they would not want to risk any mistakes coming from these changes.

    I will research worksheat change event function but in the mean time what negative effects would be caused from using the manual calculation after a row of data have been input?

  4. #4
    Registered User
    Join Date
    07-22-2010
    Location
    Oxford, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Calculate after cell entry/auto filter change

    Please Login or Register  to view this content.
    I ended up using this in the sheet section of the vba editor to calculate the row as she went along as thats the way the data is input onto her workbook.Along with a check to enable/disable manual checking on open/close. Im going to put this as solved but im sure an experience vba coder can pick apart my coding. *im very new to this*

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    The code seems

  5. #5
    Registered User
    Join Date
    07-22-2010
    Location
    Oxford, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Calculate after cell entry/auto filter change

    After applying this fix she changed the way she worked! but to be honest this code was not very friendly on having multiplesheets open at the same time. SO I changed the code again. This is a much more simple way of doing things and is MUCH more flexable apart from if excel crashes and manual mode is still set but thats another xla script to deal with that.

    ThisWorkbook
    Please Login or Register  to view this content.
    Sheet
    Please Login or Register  to view this content.
    I know i already flagged this as solved but I hope that someone might find this thread usefull even if it is very basic stuff.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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