Conditional Formatting Based on vlookup Value

E

Excel User

I have the following on one worksheet:

A B
School 1 (formatted in green) Nickname 1 (formatted in green)
School 2 (formatted in blue) Nickname 2 (formatted in blue)

On my second worksheet I have a cell that looks up school and returns
corresponding nickname using vlookup. What I need is to have the cell with
vlookup also show the formatting. So if that cell looked up Nickname 1, it
would have green formatting.
 
E

Excel User

Please keep in mind that there are hundreds of school names, so stringing if
statements for each school is not practical/possible. Thanks.
 
G

Gord Dibben

Formulas cannot return color formats so you would have to use Conditional
Formatting or event code.

If you did find a solution, keep in mind that Excel is limited to 56 colors
so the "hundreds of schools" being a unique color is impossible without
extensive code.


Gord Dibben MS Excel MVP
 
E

Excel User

Thank you Gord. I am not looking for unique colors for each school, just a
way to format both text and cell fill colors based on the content and format
of the cell it looks up.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top