Short answer
A user function cannot be used as part of a user formula in the built-in user interface of Google Sheets conditional formatting.
Explanation
In Google Sheets, the custom function is similar to the built-in spreadsheet functions, but written by the user using the Google Apps Script editor. They cannot change other objects, return only one or several values.
On the other hand, a custom function is calculated only when it is added to the cell or when at least one of its parameters changes. They cannot use non-deterministic functions like parameters such as NOW (), TODAY (), RAND (), and RANDBETWEEN ().
Test
To test the statement in the short answer, I created a by doing the following:
- Create a simple custom function
function two () {
return 2;
}
- Add a custom function as part of a custom formula in the conditional formatting sidebar
= two () = 2
Result: Nothing has changed.
References
source share