Conditional Formatting

A Parker

New Member
Joined
Sep 7, 2023
Messages
6
Office Version
  1. 2016
Platform
  1. Windows
How do I conditionally format cells, which are NOT in a range. I'm looking to highlight the highest and lowest value in random cells.
 
In case you may have (now or in the future) more columns than just D:K you could also use something like this which, although a little longer, is easily expandable since it is applied to the whole range (D:K in this case but could just as easily be D:Z or beyond), not just every second cell.

23 09 08.xlsm
DEFGHIJK
3RateAmountRateAmountRateAmountRateAmount
45001,000,000155.25310,500480.00960,000130.00260,000
5
6155.25310,500480.00960,000
CF MAX MIN (2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D4:K6Expression=AND(D$3="Amount",D4<>"",D4=MIN(IF($D$3:$K$3="Amount",IF($D4:$K4<>"",$D4:$K4))))textNO
D4:K6Expression=AND(D$3="Amount",D4<>"",D4=MAX(IF($D$3:$K$3="Amount",IF($D4:$K4<>"",$D4:$K4))))textNO
 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
In case you may have (now or in the future) more columns than just D:K you could also use something like this which, although a little longer, is easily expandable since it is applied to the whole range (D:K in this case but could just as easily be D:Z or beyond), not just every second cell.

23 09 08.xlsm
DEFGHIJK
3RateAmountRateAmountRateAmountRateAmount
45001,000,000155.25310,500480.00960,000130.00260,000
5
6155.25310,500480.00960,000
CF MAX MIN (2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D4:K6Expression=AND(D$3="Amount",D4<>"",D4=MIN(IF($D$3:$K$3="Amount",IF($D4:$K4<>"",$D4:$K4))))textNO
D4:K6Expression=AND(D$3="Amount",D4<>"",D4=MAX(IF($D$3:$K$3="Amount",IF($D4:$K4<>"",$D4:$K4))))textNO
Thanks again.
 
Upvote 0

Forum statistics

Threads
1,215,103
Messages
6,123,112
Members
449,096
Latest member
provoking

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