Conditional Formatting of cells within a table using X-Lookup to look for values from a range in a second table.

balakrd

New Member
Joined
Jul 31, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Greetings,
I am looking to use a formula to apply conditional formatting for an entire column. The value in the cell is also calculated by formulas. I am trying to apply conditional formatting to this cell and subsequently to the entire column using a formula that uses multiple XLOOKUP functions. See formula below. The conditional formatting rules does not accept this formula.

The goal is to check if a certain value in a cell is outside an upper range value or lower range value defined in a second lookup table using the XLOOKUP and OR.

=OR([@[Equity %]]>=XLOOKUP([@[Portfolio Target]],Target_Allocaton[[#All],[Portfolio Target]],Target_Allocaton[[#All],[Upper Range]],"NF",0,1),[@[Equity %]]<=XLOOKUP([@[Portfolio Target]],Target_Allocaton[[#All],[Portfolio Target]],Target_Allocaton[[#All],[Lower Range]],"NF",0,1))

Thank you in advance for any pointers or if there is a more efficient way to implement conditional formatting.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
You can add a column and populate it with this formula. Then hide it (after setting up and testing the cond format, of course). Then have conditional formatting of your required column, by refering to the hidden column.
 
Upvote 0

Forum statistics

Threads
1,222,564
Messages
6,166,818
Members
452,074
Latest member
Alexinho

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