Forum Discussion
matthys6065
Jul 29, 2025Copper Contributor
Conditional Formatting with formula
Hi, I hope everyone is doing well. =AND(LEFT($A1,2)="2G", $C1="KIMBERLEY") Can someone please help me with this formula, it keeps giving me an error and I do not know whats wrong with it. I want t...
- Jul 30, 2025
depending on where you live / local setting you may need to use ; instead of , so it might be:
=AND(LEFT($A1;2)="2G"; $C1="KIMBERLEY")
as for 'hard coding' you can use a table on this or another sheet to help define the possible combinations and something like:
=AND(ISNUMBER(XMATCH(LEFT($A1;2); TABLE1[codes])); ISNUMBER(XMATCH($C1; TABLE1[cities])))
m_tarler
Jul 29, 2025Bronze Contributor
I don't see what error that formula would produce unless there is already an error in cell A1 or C1. Otherwise it should just return TRUE or FALSE
Maybe include a sample sheet
Also what you 'want' because you say you "need the "2G" and then something about column C "needs to be a different town" but those statements don't make much sense with the formula you included.