Conditional Format cells based on a value within the row

ddander54

Board Regular
Joined
Oct 18, 2012
Messages
97
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
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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).
 
Upvote 0
Highlight the data you want to work on, say F2:H10 & use this formula
=AND($D2="Available Capacity",F2<0) for the red
 
Upvote 0
Solution
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
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,213,484
Messages
6,113,920
Members
448,533
Latest member
thietbibeboiwasaco

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
Back
Top