+ Reply to Thread
Results 1 to 6 of 6

VBA to disable automatic formula UPDATING not Calculation

  1. #1
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    826

    VBA to disable automatic formula UPDATING not Calculation

    So here's the problem.
    I have a template in which I have 2 cells with vlookup formulas that point to a fixed range (with the $) on a help sheet.
    Now the macro pulls in data from another sheet on to this help sheet onto the fixed range that is used in the formula.

    However the data which is copied has empty columns between the filles columsn.
    With a piece of vba code I take this empty columns out and the lookup range is back to its original state again so no worries I thought.

    However the vlookup formula reacts on this deleting of empty columns by adjusting my (fixed) lookup range.
    So ie at start the lookup range is $G:$T and after is $G:$N and antother run of the macro brings it to $G:$H.

    Normally I welcome this excel inteligence of adjusting your formulas when you delete rows, columns or move things.
    But this time it is certainly not welcome.

    I tried with :
    Please Login or Register  to view this content.
    And then the deletion of the empty columns between turning off and on the calculation.

    But this wont do the trick....

    So is there also code to disable the automatic updating of formulas?
    And as above I am not refering to automatic calculation of the formulas because that is something different.
    Thanks.

  2. #2
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: VBA to disable automatic formula UPDATING not Calculation

    If the formula is in the VBA you can re apply it to the same range after the columns have been deleted. That's the first thought that came into my head. Worth a try

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: VBA to disable automatic formula UPDATING not Calculation

    Quote Originally Posted by Philb1 View Post
    If the formula is in the VBA you can re apply it to the same range after the columns have been deleted
    +1 to this Since deleting the core component (Cells / Columns) will make it to adjust automatically.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    826

    Re: VBA to disable automatic formula UPDATING not Calculation

    Thanks Phil you are right in that. But that was my last resort
    It is not a simple vlookup, the lookup is part of a much much more complex formula.
    Could record it and that way put it in the code.
    But I would like to have the formula in the top cell just to be able to copy it manually down if I have to ammend the list manually.

    But you are right when there is no VBA solution that is probably what I will need to do but hopefully somebody knows a VBA solution.

  5. #5
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    826

    Re: VBA to disable automatic formula UPDATING not Calculation

    thanks sixthsense so what you are saying is that it just cannot be done because it always will adjust automatically?

  6. #6
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    826

    Re: VBA to disable automatic formula UPDATING not Calculation

    Ok I solved my problem with a little detour but at least I have now what I wanted

    So I did not paste the new data directly to the lookup range but I copied to columns AA and further.
    Did the removing of empty columns there and than copied and paste the correct new lookup area to column G and further.

    This way the lookup formulas are not influenced and I got exactly what I wanted with this slight detour
    Thanks all for your inputs.

+ 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] Excel 2010 - Function not updating (#value) in automatic calculation or otherwise
    By bassplr19 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-15-2013, 04:36 PM
  2. Replies: 1
    Last Post: 05-15-2013, 01:35 AM
  3. How do i Show formula calculation % done while screen updating = off?
    By JTwrk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-16-2012, 04:09 PM
  4. Automatic Formula Updating
    By jamaljan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-24-2010, 04:28 PM
  5. Automatic formula updating
    By amirs318 in forum Excel General
    Replies: 1
    Last Post: 07-21-2008, 07:49 PM

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