+ Reply to Thread
Results 1 to 6 of 6

Conditional Formatting with array formula

  1. #1
    Registered User
    Join Date
    09-19-2008
    Location
    Gloucester, MA
    MS-Off Ver
    Excel 2016
    Posts
    62

    Conditional Formatting with array formula

    I read somewhere that Conditional Formatting evaluates custom formulas as though they were array formula, so you may use array formulas in format conditions. You do not enter them with Ctrl+Shift+Enter in the CF dialog as you normally do in worksheet cells. Excel will always treat a custom formulas in CF as an array formula, even if it is not one.

    When I copied my formula with an array to the CF dialog box and clicked Ok, the conditional formatting didn't work. It only worked for the first column of data. Does anyone have experience with this?

    What I am trying to do is strike out the rows of data that are not the latest ver. Only the first column was formatted correctly. Is there a way around this? Thanks.
    Attached Files Attached Files
    Last edited by kadams99; 07-03-2013 at 11:48 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Conditional Formatting with array formula

    Is the latest version for any one value always the furthest down in the list?

    If so, highlight D14:N79 and apply this CF:

    =COUNTIF($D$14:$D14, $D14) <> COUNTIF($D:$D, $D14)
    Last edited by JBeaucaire; 07-02-2013 at 08:27 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Conditional Formatting with array formula

    Not real sure how you define what cells should be formatted but...

    The formulas entered in column O of the worksheet are different than the formulas used as the conditional formatting rule.

    The CF formula references cells on row 14 for every cell to be formatted but the formulas in column O refer to the row that the formula is entered on.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,701

    Re: Conditional Formatting with array formula

    You have a missing $ in your (conditional formatting) formula - the first D14 must be preceded by $
    Audere est facere

  5. #5
    Registered User
    Join Date
    09-19-2008
    Location
    Gloucester, MA
    MS-Off Ver
    Excel 2016
    Posts
    62

    Re: Conditional Formatting with array formula

    Thanks for your comments. I've gone home for the night but will check on this tomorrow.

  6. #6
    Registered User
    Join Date
    09-19-2008
    Location
    Gloucester, MA
    MS-Off Ver
    Excel 2016
    Posts
    62

    Re: Conditional Formatting with array formula

    Thanks daddylonglegs! That was the issue - I added the missing $ as you pointed out, and it is working perfectly now.

    Many Thanks for all your help!

+ 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