+ Reply to Thread
Results 1 to 7 of 7

Converting conditional formatting into static

  1. #1
    Forum Contributor
    Join Date
    03-05-2015
    Location
    norwich
    MS-Off Ver
    365
    Posts
    107

    Converting conditional formatting into static

    I've spent about a day searching high and low for some VBA code which will turn conditional formatting into static formatting but I'm not quite getting what I want.

    The best I've managed to find is the code below, which is amazing in the sense that if there are more than conditional formats per cell it will pick the one that is true. HOWEVER, it doesn't work if the conditional formatting is based on a formula instead of it's cell value.

    Anyone any ideas on how they can tweak the below?

    Please Login or Register  to view this content.
    Thanks for your time

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,894

    Re: Converting conditional formatting into static

    Can you upload sample workbook? With unaltered worksheet and also expected result sheet to show what exactly that you are trying to do.

    To upload a file, use "Go Advanced" button and follow "Manage Attachments" hyperlink. It will launch new tab/window to manage uploads.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Forum Contributor
    Join Date
    03-05-2015
    Location
    norwich
    MS-Off Ver
    365
    Posts
    107

    Re: Converting conditional formatting into static

    I've just made a quick example,

    1) If you have the conditional formatting as it is when you download it then it converts the first formula in the conditional formatting to a static colour but ignores the second conditional formatting formula
    2) If you convert the conditional formatting to cell value and have yellow =1, green =2 then it will convert both to a static colour. I'm not sure why it won't do it with the formula option!!

    Thanks for getting back to me
    Attached Files Attached Files

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,894

    Re: Converting conditional formatting into static

    Try something like below.
    Please Login or Register  to view this content.
    Edit: On second thought have .FormatConditions.Delete in outer if instead of in inner if.
    Last edited by CK76; 01-15-2019 at 12:56 PM.

  5. #5
    Forum Contributor
    Join Date
    03-05-2015
    Location
    norwich
    MS-Off Ver
    365
    Posts
    107

    Re: Converting conditional formatting into static

    How can something so simple work so beautifully!?!!!!!?!!!!!!!!!!!!

    I think you've done it, I just need to test it on the proper spreadsheet!!

    I'll get back to you

  6. #6
    Forum Contributor
    Join Date
    03-05-2015
    Location
    norwich
    MS-Off Ver
    365
    Posts
    107

    Re: Converting conditional formatting into static

    Works like an absolute dream!!! Thank you so much

  7. #7
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,894

    Re: Converting conditional formatting into static

    You are welcome and thanks for the rep

+ 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] Converting Conditional Formatting to regular formatting.
    By Graham Pall in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-26-2021, 08:41 AM
  2. [SOLVED] Make conditional formatting static
    By alice2011 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-20-2018, 06:50 AM
  3. Conditional Formatting static Applies To
    By OAM in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-08-2016, 11:44 PM
  4. Conditional to static formatting
    By sbennett3705 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-30-2012, 06:49 PM
  5. Converting Time and Conditional Formatting
    By skate1991 in forum Excel General
    Replies: 1
    Last Post: 01-04-2012, 02:26 PM
  6. Converting conditional formatting to static cell background
    By abousetta in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-11-2011, 02:30 PM
  7. Converting Conditional Formatting code
    By MitchS in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-16-2011, 05:04 PM

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