Home » excel » excel – How to do a index/match conditional formatting on a cell that contains structured table references

excel – How to do a index/match conditional formatting on a cell that contains structured table references

Posted by: admin May 14, 2020 Leave a comment

Questions:

I am trying to get the cell to be colored red using conditional formatting when the matched text is “Monthly Regular”

The sample code is below:

=IF(index(Salary[Type],match($A2,Salary[Person],0))="Monthly Regular",TRUE,FALSE)

The error i’m getting is:
enter image description here

How to&Answers:

To use a structured table reference in a conditional formatting formula, use the INDIRECT function. So your conditional formatting formula becomes:

=INDEX(INDIRECT("Salary[Type]"),MATCH($A2,INDIRECT("Salary[Person]"),0))="Monthly Regular"

Note also that you don’t need the IFTRUE,FALSE function.