+ Reply to Thread
Results 1 to 6 of 6

Edit conditional formating rule as text

  1. #1
    Registered User
    Join Date
    11-02-2022
    Location
    Berlin
    MS-Off Ver
    Excel? LTSC MSO (16.0.14332.20378) 64-bit
    Posts
    3

    Edit conditional formating rule as text

    I want to create many custom conditional formating rules that only differ in some values. Is there any way to export the conditional formating rules to a .txt-file, edit it, and import it afterwards? Or a way to directly edit the rules as text? If I use the GUI-way to create all these rules, it takes way to long.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,937

    Re: Edit conditional formating rule as text

    You can use VBA - but you need some logic to figure out how to change the rule, or use a table of values to insert into the rule in sequence.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,368

    Re: Edit conditional formating rule as text

    If you select a CF formatted cell, click on Conditional Formatting, select Manage Rules, Double Click on one of the conditions, and then click into the formula. You can now Edit the formula.

    HOWEVER, if you move the cursor, it will screw up the formula. Notice that, in the bottom left corner on the Status bar, it will say "Enter". If you press F2, it will change to "Edit". You can now edit the formula as you would a formula in the formula bar. You can press Ctrl-A to select all the text, and Ctrl-C to copy it. You can then, if you wish, Paste it into another condition and edit it.

    I think, if you wanted to automate the export and/or import of the conditions, you would need VBA. I suspect that might be tricky.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    11-02-2022
    Location
    Berlin
    MS-Off Ver
    Excel? LTSC MSO (16.0.14332.20378) 64-bit
    Posts
    3

    Re: Edit conditional formating rule as text

    TMS: what you said is only true for the "Applies to"-column in the Conditional Formating Rules Manager. However I also need to edit the colorcode (or at least copy the whole rule, not just the "Applies-to"-formula).

    Bernie: Okay, I guess I will learn VBA then. Thank you

  5. #5
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,937

    Re: Edit conditional formating rule as text

    You don't need to learn VBA - not an easy task. You can always describe what you want in the macro, and get code that you can use or easily modify.

  6. #6
    Registered User
    Join Date
    11-02-2022
    Location
    Berlin
    MS-Off Ver
    Excel? LTSC MSO (16.0.14332.20378) 64-bit
    Posts
    3

    Re: Edit conditional formating rule as text

    Alright, thank you

+ 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. Replies: 22
    Last Post: 04-29-2022, 09:12 AM
  2. Replies: 5
    Last Post: 02-11-2019, 03:07 PM
  3. Replies: 6
    Last Post: 01-11-2016, 09:04 AM
  4. Conditional Formating or Rule
    By munna316 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-11-2015, 11:42 AM
  5. Replies: 3
    Last Post: 10-13-2011, 08:53 AM
  6. sum by cell color:conditional formating rule
    By dragod in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-04-2010, 02:40 PM
  7. Replies: 9
    Last Post: 12-22-2009, 11:30 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