Conditional Format cells based on a value within the row

ddander54

Board Regular
Joined
Oct 18, 2012
Messages
60
Is there a formula I can use in Conditional Formatting to highlight specific cells (not the row) based on the text in one cell in the row to highlight the data in the same row? Currently I'm creating 3 CF's (">0", "=0', "<0") in the specific row of data, then using the Format Painter to copy the format to the next row where the 'condition' occurs. There are now a thousand rows, so the Format Painter is a little too much on a daily basis.

My 'condition' is in Column D (starts at D8 is the text "Available Capacity"), My data to highlight is in Columns F:Q (F8:Q8)...Green fill if ">0", Yellow fill if "=0", Red fill if "<0".
So my data looks like this:
Col C | Col D | Col F | Col G | Col H.......
John | blank | blank | blank | blank.....
John | Total Capacity | 132 | 148 | 156.....
John | Total Assignments | 100 | 152 | 156
John | Available Capacity | 32 | -4 | 0
Suzy | blank | blank | bank | blank
Suzy | Total Capacity | 148 | 150 | 132
Suzy | Total Assignments | 148 | 148 | 152
Suzy | Available Capacity | 0 | 2 | -20

Or is this just a job for VBA?


Thanks,
Don
 

Some videos you may like

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,744
Office Version
  1. 365
Platform
  1. Windows
Select the whole range that you want to apply it to, then write the formula as it applies to the very first cell in your selection.
Provided that you use the proper mix of absolute/relative range references, Excel will automatically adjust the formula for all the other cells (just like when you copy a formula down or across).
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,794
Office Version
  1. 365
Platform
  1. Windows
Highlight the data you want to work on, say F2:H10 & use this formula
=AND($D2="Available Capacity",F2<0) for the red
 
Solution

ddander54

Board Regular
Joined
Oct 18, 2012
Messages
60
Joe4, Fluff,

For some reason when I previously tried the =AND.... formula I wasn't able to get it to work. It works like it should now.

Thank you for your confirmation and answer!

Don
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,794
Office Version
  1. 365
Platform
  1. Windows
Glad we could help & thanks for the feedback
 

Watch MrExcel Video

Forum statistics

Threads
1,128,117
Messages
5,628,793
Members
416,340
Latest member
PJB1102

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