Using XLOOKUP in Conditional Formatting

Mortiray

New Member
Joined
Oct 27, 2022
Messages
37
Office Version
  1. 365
Platform
  1. Windows
I'm having trouble getting a conditional formatting rule to work. For context, I have three columns - a ship date, a deliver date, and a ship method. I have a table full of possible ship methods, and the associated number of days it takes to ship using that method, and I want my ship method cell to light up red if it'll be too slow for the shipping request. When I type the following formula:
Excel Formula:
=AND($P4-$O4 > XLOOKUP($R4, ShippingMethodList[ShippingMethods], ShippingMethodList[Days], 100), ROW() > 3)
into a cell on the worksheet, it works perfectly fine (returns TRUE or FALSE), but when I paste this exact code into my conditional formatting rule, it gives me a "There's a problem with this formula" error. Any idea why?
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
You cannot use structured references in CF you will need to change them to ranges.
 
Upvote 0
Solution
You cannot use structured references in CF you will need to change them to ranges.
lame. I changed it to
Excel Formula:
=AND($P4-$O4 > XLOOKUP($R4, Metadata!$C$2:$C$18, Metadata!$D$2:$D$18, 100), ROW() > 3)
and it worked, thanks
 
Upvote 0
Glad you sorted it & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

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