+ Reply to Thread
Results 1 to 4 of 4

macro to retain the conditional formatting result but to remove the rules behind

  1. #1
    Registered User
    Join Date
    11-09-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2007
    Posts
    2

    macro to retain the conditional formatting result but to remove the rules behind

    hi,

    I'm enhancing my report which using a lot of conditional formatting (CF) rules and it causes increasing in the file size and slowness in opening the file.

    i found a code, but it always read the CF as active whenever the cells had CF rules applied on it without checking whether the cells values met the conditional or not.

    can anyone help to modify the code.

    ex. cell (D:D) is the reference cell. if value for range (G7:L20) < reference cell, the font appear in red. otherwise, black.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: macro to retain the conditional formatting result but to remove the rules behind

    Hello eassy,

    Welcome to the Forum.

    found a code, but it always read the CF as active whenever the cells had CF rules applied on it without checking whether the cells values met the conditional or not.
    I checked it out on my Machine, and I cannot replicate your "problem". The Code works fine. Maybe your Data goes beyond the specified Range("A1:AM133"). If that's the case, change it accordingly.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Registered User
    Join Date
    11-09-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: macro to retain the conditional formatting result but to remove the rules behind

    the code seem working fine.. but i do not get the desired output..
    ex: my reference value is 250.... when the cells value < 250, the font will be in red colour. whereas when it is greater than that, it will be in black (normal).. i just set one formatting rule that is when the cells value less than the reference cell, the font will be in red.

    but when i ran the macro, all my cells font turn to red no matter the cells met the conditional rules or not....
    that is my problem.

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: macro to retain the conditional formatting result but to remove the rules behind

    Then change this line:

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    I have done that in the attached sample WorkBook, and it works fine.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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