Forum Discussion

PeterBartholomew1's avatar
PeterBartholomew1
Silver Contributor
Dec 28, 2025

Playing with conditional formatting

This formatting is something I used to restructure the way I wrote formulas between 2015 and 2018.  In the original I used VBA but now, as often happens, worksheet formulas used within conditional formatting are sufficient.  The formula defining the condition is

= DIRECTREFλ(A1)

//Function to test for the presence of direct cell references
DIRECTREFλ
= LAMBDA(cell, 
    IF(ISFORMULA(cell), REGEXTEST(FORMULATEXT(cell), "\b[A-Z]{1,3}\${0,1}\d{1,6}\b"))
);

The original was pretty effective as a training aid to avoid the practice of relative referencing and use defined names!

That said, not many followed my lead!

Mind you when I posted a discussion on Chandoo it didn't meet with overwhelming support, though subsequent events in the form of spilt ranges have made my life so much easier!  The post did however stimulate more discussion than I had anticipated.

The A1 notation is an abomination that has no place within serious spreadsheet design -- discuss? | Chandoo.org Excel Forums - Become Awesome in Excel

 

No RepliesBe the first to reply

Resources