+ Reply to Thread
Results 1 to 6 of 6

Change formula to work in conditional formatting

  1. #1
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    Change formula to work in conditional formatting

    Hi,

    I have the following code that is working ok

    Please Login or Register  to view this content.
    I need to change so that I can use it in conditional formatting.

    I tried to use INDIRECT but I am having some problems because I am not used to work with it. I' ve been thinking to use COUNTIFS instead of SUM.

    Any help would be great!

    Regards,
    Elio Fernandes
    Attached Files Attached Files
    Last edited by efernandes67; 01-03-2011 at 06:46 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Change formula to work in conditional formatting

    I think you need to post a file so we can better understand the context / requirements.

    Depending on the XL version being used and the file type used when saved (see * below) the formula you outlined would be viable for Conditional Formatting as formulae are processed as Arrays by default:

    Please Login or Register  to view this content.
    If you are using XL2007+ you should be using COUNTIFS as it's significantly more efficient.
    Moreover, if you are using XL2007 it also circumvents the bug outlined below at foot of post (see * section)

    Please Login or Register  to view this content.
    * in 2007 there does appear to be a bug in terms of Array formula rules not evaluating correctly on the file being re-opened

    Fixes would appear to be any one of:

    1) re-apply CF upon open
    2) create rules in Compatibility Mode
    3) use embedded INDEX calls to remove Array nature of formula

  3. #3
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    Re: Change formula to work in conditional formatting

    Hi,

    I think I wasn't clear enough. Here goes my file. What I need is the VBA code for conditional formatting, not the excel code.

    Regards,
    Elio Fernandes

  4. #4
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    Re: Change formula to work in conditional formatting

    Hi,

    I just found the way!

    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.
    Regards,
    Elio Fernandes

  5. #5
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    Re: Change formula to work in conditional formatting

    The last reply as the code for excel conditional formatting and this one is to be used with VBA.

    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    Elio

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Change formula to work in conditional formatting

    Elio, I can only presume you're (at some point) physically deleting and replacing Table1 else there is no need for INDIRECT
    (the INDIRECT doesn't affect the Volatility of the solution here [CF is super volatile regardless] but it's possibly an unnecessary function call)

+ 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