Color a bar RED based on a value being "RED"

jkalpus

New Member
Joined
Apr 17, 2004
Messages
46
Greetings! I need to have Excel format a bar as red if a value in the table is "red." For example:

In cell A1, A2, A3, I've got Rep / % / Team
In cell B2, B2, B3, I've got Steve / 90 / blue
In cell C1, C2, C3, I've got Bob / 40 / blue
In cell D1, D2, D3, I've got Phil / 65 / red

I want Excel to format Steve's bar to be BLUE, because he's a member of the "blue" team. I'd like the other bars to be similarly formatted in blue and red.

Any ideas?

Thanks for thinking! - John
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
54,312
Office Version
  1. 365
Platform
  1. Windows
1. Select all of rows 1,2 and 3 by clicking and dragging in the row labels area.
2. Apply the Conditional Formatting shown (iF you need help with how to do this, post back)

Excel Workbook
ABCDE
1RepSteveBobPhil
2%904065
3TeamBlueBlueRed
Conditional Formatting
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A11. / Formula is =A$3="Blue"Abc
A12. / Formula is =A$3="Red"Abc
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,982
Messages
5,834,704
Members
430,310
Latest member
Excelorate3305

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top