2 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Conditional formatting formula errors using table references, but works if converted to cell ranges?

I have scheduling tool that is a table with weeks of the year as columns and projects as rows, and I would like to get a milestone date from a different table and highlight the cell the matching project and week. Ideally, everything in the formula would be named references since the structure of this table is continuously being altered.

I started with this in a conditional format rule in G4 to BE40 within the table T_Sandbox:

LET(PowDate, XLOOKUP( T_Sandbox[@[Project]:[Project]], T_Projects[[Project]:[Project]], T_Projects[[Power Up Date]:[Power Up Date]] ), AND( ISNUMBER(PowDate), PowDate>=G$2, PowDate<H$2 ) ) 

This gave an excel formula error despite working fine and returning TRUE in the correct cells if pasted into the table. I actually would have preferred the G$2 and H$2 (representing the current and next weeks' dates which are above the actual table since table headers can't be formulas) be relative named references, but I don't really know a clean way to do relative named references. I digress.

AI told me the @ syntax wasn't supported, so that was the first to become a regular cell reference of $B4. No joy. Then AI told me the absolute reference to a table column wasn't needed in conditional formatting so T_Projects[[Project]:[Project]] became T_Projects[Project] (obv' same with one below it). No joy, same formula fault.

I replaced the table references with normal ranges like 'Milestones'!$B$11:$B$43 and it worked. No more than an hour later we added more projects and I'm editing the formula to increase the range, exactly what I want to avoid by using named/table references! Is there a way to fix the table references to work in conditional formatting formulas? Is nesting into LET() the issue and is there an alternate way that isn't just using three XLOOKUP()? Is there a clean way to at least replace the G$2 H$2 with a named reference?

submitted by /u/CapinWinky
[link] [comments]

Want to read more?

Check out the full article on the original site

View original article

Tagged with

#no-code spreadsheet solutions
#financial modeling with spreadsheets
#AI formula generation techniques
#formula generator
#rows.com
#Excel compatibility
#Excel alternatives for data analysis
#Excel alternatives
#conditional formatting
#table references
#cell ranges
#milestone date
#XLOOKUP
#named references
#T_Sandbox
#G4 to BE40
#Power Up Date
#table columns
#ISNUMBER
#relative named references