Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8821053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:45:33+00:00 2026-06-14T05:45:33+00:00

I have a function that I have implemented as a VBA module which takes

  • 0

I have a function that I have implemented as a VBA module which takes one cell as a parameter and queries a web services to return a result. As the source of the data is remote, this function can take a few seconds to return.

The problem is that some actions, such as deleting any column, seem to cause every formula to recalculate, even if no change is needed. When my sheet has several hundred rows, this can take several minutes during which time Excel is unresponsive.

I would like to find some way to detect that no change is needed and skip this step. Some things I have tried:

  • Determine the current value of the cell to be changed, from which I could determine if an update is needed. But ActiveCell.Value is blank, and attempts to pass the cell itself as a second parameter are met with a circular reference warning.
  • Created a second column to hold the old input value, which is then passed into the function and compared with the new value. However, functions are not able to update this old value on success, and attempts to update with only formulas are always met with circular reference warnings. Furthermore, it doesn’t seem that a function can return a “no change”, so I would need to store and use the old result.

Is there any way to prevent some actions from updating every formula on the sheet?

Other requirements:

  • There may be a way to disable all formula automatic calculation, but I definitely want each row to update as soon as the parameter cell is entered. I also don’t want to force the user to push a button to update the function.
  • I tried doing a custom spreadsheet in Visual Studio, but found the deployment too difficult to maintain for my user base. Solution must be entirely contained in a macro-enabled workbook.
  • Excel versions to use the sheet will be 2007 and 2010.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:45:34+00:00Added an answer on June 14, 2026 at 5:45 am

    I would

    1. systematically block recalculation by setting File / Options / Formulas / Workbook Calculation to “Manual” and switch off “Recalculation on Save” as well

    2. create a Private Sub Worksheet_Change(ByVal Target As Range) and determine, under which conditions a recalculation should take place (Target.Worksheet.Calculate) – for example determine the coord’s of the target (using Target.Column and Target.Row), and call the query from inside the Worksheet_Change trigger.

    3. Eventually I would put the recalculation instruction in a Sub of its own and make a button into the sheet so the user can – on his/her wish – manually trigger recalculation (just in case the F9 key isn’t known to the users)

    4. It is also thinkable to use a global Boolean variable need_Query which is set by the Worksheet_Change trigger If Target.Row = X And Target.Column = Y (= the parameter) and have the query function examine (and reset) that Boolean, and go in the query only If need_Query Then, otherwise exit without action. Make sure that need_Query is set FALSE at worksheet load time, too.

    5. Finally, you could convert the query function into a Sub and formulate some more complex conditions in the Worksheet_Change trigger to fire it (e.g. if a certain column changes, etc.).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Excel VBA function that takes a number of optional parameters, including
Inside my Controller i have function that runs after user clicks on item, which
I have a function that takes an input string and then runs the string
I have implemented the javascript function that allows me to do a .NET (4.0)
I have a javascript fade function that I implemented into a banner div so
I have a function that updates data in a cache (implemented as a dictionary).
If I have a function foo() that windows has implemented in kernel32.dll and it
I have implemented a simple search function that highlights a row in a DataGrid
So I have function that formats a date to coerce to given enum DateType{CURRENT,
In my Java code I have function that gets file from the client in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.