+ Reply to Thread
Results 1 to 5 of 5

Syntax for Conditional formatting using named ranges

  1. #1
    Registered User
    Join Date
    02-07-2015
    Location
    Massachusetts
    MS-Off Ver
    2010
    Posts
    3

    Syntax for Conditional formatting using named ranges

    Hi

    I'm not sure if it is possible to reference named ranges when entering the formulas into the conditional formatting.

    I have attached a file with the named range and show the expected results below it.

    Basically I have a horizontal named range of cells with values (cells F8, G8, H8, ...)
    When any of the cells vertically below it have the same value as the cell above it in the named range I want it to have a color.

    I realize I don't have to use a named range but I would prefer to if it is possible.

    Mark

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Syntax for Conditional formatting using named ranges

    Using a named range wouldn't really be necessary there...

    The formula would be
    =F9=F$8
    Applies To Range is
    =$F$9:$K&8

  3. #3
    Registered User
    Join Date
    02-07-2015
    Location
    Massachusetts
    MS-Off Ver
    2010
    Posts
    3

    Re: Syntax for Conditional formatting using named ranges

    Hi

    Is it possible to use a named range in conditional formatting? If yes how to I refer to it. In the example is named "Cores"

    Mark

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Syntax for Conditional formatting using named ranges

    Yes you can use named ranges in Conditional formatting.
    But in this case you've created, it actually makes it more difficult (the opposite of what named ranges are supposed to do).

    You can't do a 1 to 1 comparison of say F9 to F8 when F8 is a member of a named range covering F8:K8
    so F9=Cores would be like F9=$F$8:$K$8
    And that doesn't work, as you fill it through the range, it becomes
    =G9=$F$8:$K$8
    =H9=$F$8:$K$8

    Every single cell will actually only look at F8
    =G9=$F$8
    =H9=$F$8


    You would have to use some conbination of Index and Column() to tell it 'which' cell within Cores are you trying to compare F9 with ?
    Something like
    =F9=INDEX(Cores,COLUMN(A1))

    But that just creates unnecessary calculations, when a simple
    =F9=F$8 works just fine.

  5. #5
    Registered User
    Join Date
    02-07-2015
    Location
    Massachusetts
    MS-Off Ver
    2010
    Posts
    3

    Re: Syntax for Conditional formatting using named ranges

    Thanks for helping me understand.

    Mark

+ 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. Conditional formatting using named ranges.
    By Turtleman10 in forum Excel General
    Replies: 0
    Last Post: 05-16-2013, 08:57 AM
  2. [SOLVED] Conditional formatting with named ranges, need help!
    By petelomax in forum Excel General
    Replies: 2
    Last Post: 04-27-2012, 06:30 AM
  3. [SOLVED] Conditional Formatting with Named Ranges
    By Revverend in forum Excel General
    Replies: 7
    Last Post: 04-02-2012, 05:31 AM
  4. conditional formatting based on 5 named ranges
    By dcgrove in forum Excel General
    Replies: 8
    Last Post: 01-06-2010, 06:10 PM
  5. Conditional Formatting to HIghlight named ranges - error
    By Malte Nuhn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2005, 05:05 AM

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