# Syntax for Conditional formatting using named ranges

1. ## 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. ## 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. ## 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. ## 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. ## Re: Syntax for Conditional formatting using named ranges

Thanks for helping me understand.

Mark

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

#### 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