Solved

# Conditional Formatting with a List

Posted on 2012-09-19
444 Views
I have a list of values that I want conditional formatting to use to highlight certain text.

Sheet 2 A1:A13 contains the values that I want to search through each cell in Column H. I want to highlight the text as red
0
Question by:wrt1mea

LVL 31

Expert Comment

Are the values in column A excerpts from or whole values the same as column H.

If whole value you could use the MATCH function in a formula based Conditional Formatting like this:

=MATCH(H1,\$A\$1:\$A\$13,0)

Thanks
Rob H
0

LVL 23

Expert Comment

If I understood correctly.....

select column H and invoke conditional formatting...

assuming Excel 2007 or later, that would be through Home|Conditional Formatting|New Rule

Then select use a formula to determine which cells to format..

enter formula:

=MATCH(H1,\$A\$1:\$A\$13,0)

where H1 is top most cell you selected in column H.

then choose Format and select from Font tab.

If you are using pre-Excel2007, then go to Format|Conditional Formatting and choose Formula Is, then do as above.

If A1:A13 is in a separate sheet from column H, then first name the A1:A13 range by selecting it, and typing a name in the Name Box (just to the left of the formula bar at the top)... call it something like MyList... then substitute that in the formula e.g.

=MATCH(H1,MyList,0)

Hope it helps.
0

LVL 1

Author Comment

The values are exerpts from the values in column H....will that change the formula?
0

LVL 23

Accepted Solution

Yes it will... try then:

=LOOKUP(9.99999E+307,SEARCH(\$A\$1:\$A\$13,H1))

or

=LOOKUP(9.99999E+307,SEARCH(MyList,H1))
0

LVL 1

Author Comment

I got this one to work, =LOOKUP(9.99999E+307,SEARCH(\$A\$1:\$A\$13,H1))

But it highlights the the entire text in the cell, not just the text that contains the specific values.
0

LVL 23

Expert Comment

You can't highlight just the specific text within the cell, the whole cell will get highlighted..... not with Conditional Formatting....

You would probably need VBA to do that, and it's not in my scope....
0

## Featured Post

### Suggested Solutions

The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
This collection of functions covers all the normal rounding methods of just about any numeric value.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…