+ Reply to Thread
Results 1 to 3 of 3

Problem with conditional formatting and recalculation

  1. #1
    Registered User
    Join Date
    12-19-2016
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    2

    Problem with conditional formatting and recalculation

    I have spreadsheet which has a lot of optional inputs and an output, after much calculating, via pivot tables. Some of the information in the pivot tables needs "de-linking" from the input during the process and to do that I use a bit of VBA to copy the relevant values from the pivot tables to other ranges.

    Unfortunately it doesn't work. And the reason why it doesn't work is that the VBA code does not wait for the pivot tables to recalculate before going on its merry way. Normally I would test the state of the Application.CalculationState property to find out whether the recalculations were complete. But I can't - because of what I think is an Excel bug, the CalculationState already returns xlPending when the spreadsheet contains any volatile functions.

    Now there are no volatile functions in the spreadsheet, BUT using conditional formatting also makes the spreadsheet volatile and that is what is causing the problem. I need conditional formatting to alert users as to what optional inputs they need to input by colour coding the cell backgrounds and borders so I can't remove all the conditional formatting.

    So how do I either (a) stop the VBA code from executing whilst retaining conditional formatting or (b) make some form of conditional formatting non-volatile? I can't find any way of achieving (a). For (b) I can only think of putting all the formatting into code and executing it through the OnChange event - which is clunky, slow and tedious to implement.

    Any suggestions welcome.

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Problem with conditional formatting and recalculation

    "I have spreadsheet which has a lot..."
    if only one could have just a quick look at it

  3. #3
    Registered User
    Join Date
    12-19-2016
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Problem with conditional formatting and recalculation

    Sadly, I can't post it. Too confidential. But I think I have given enough information to show what the problem is. If not, do ask for clarification.

+ 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] Conditional Formatting problem
    By Jhertilus in forum Excel General
    Replies: 3
    Last Post: 08-09-2015, 06:16 AM
  2. [SOLVED] Easily Formatting Numbers as Percentages Without Automatic Recalculation
    By vinceancona in forum Excel General
    Replies: 6
    Last Post: 05-23-2013, 02:45 PM
  3. Problem with automatic recalculation
    By Hjahren in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 12-14-2010, 07:19 AM
  4. Conditional Formatting problem
    By KINNEY0201 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-18-2010, 07:16 PM
  5. Problem with Slow ReCalculation of Dynamic Range Using OFFSET
    By Kris_Wright_77 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-18-2005, 06:20 AM
  6. Controling recalculation - or how to solve my speed problem?
    By Peter Lipp in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-13-2005, 11:05 AM
  7. Problem in Excel RTD and Manual Recalculation
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-31-2005, 07:05 AM

Tags for this Thread

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