Conditional Formatting with IF(AND)

bubblystace

New Member
Joined
Dec 5, 2017
Messages
8
Hi All,

I'm stuck on some CF and hope someone can help please :)

I want to CF to highlight non-blank cells if B4 is not N/A. I've tried using formula below but not sure why it isn't working.
=IF(AND($D4='ConditionRatings'!$A$1:$A$4),AND(COUNTBLANK($D1:$D5)>0))

E.g. If B4 is "1" then B1, B2, B3 and B5 need to be populated, if not they are to be shaded red.

[TABLE="class: grid, width: 100"]
<tbody>[TR]
[TD][/TD]
[TD]COLUMN A[/TD]
[TD]COLUMN B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Measurement[/TD]
[TD]10LM[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Material[/TD]
[TD]Brick[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Height[/TD]
[TD](red fill)[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Condition Rating[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Remaining Life[/TD]
[TD](red fill)[/TD]
[/TR]
</tbody>[/TABLE]


 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hi,

The formula you posted won't work, it's syntax and logic is incorrect in more ways than 1.
Without knowing more about your setup, and just based on your description, you can use the following formula as your CF formula in B1, B2, B3, B5.


Book1
ABCD
1Measurement10LMFALSE
2MaterialBrickFALSE
3HeightTRUE
4Condition Rating1
5Remaining LifeTRUE
Sheet8
Cell Formulas
RangeFormula
D1=AND(B$4<>"NA",B1="")


Enter formula as CF formula for B1, format Fill Red, then use Format Painter to copy for B2, B3, B5.
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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