익명 19:03

How can I use conditional formatting in an Excel table using structured referenc...

How can I use conditional formatting in an Excel table using structured references?

I believe I am correct in saying that a reference to a column in a table (e.g. table1["col1"]) is known as a structured reference as opposed to an absolute reference (e.g. A1:A5).

I would like to know if it is possible to use structured references in a table. This post: Structured table references in conditional formatting formulas suggests that it is possible using INDIRECT()however I cannot figure out how to achieve what I need. I'll explain.

Take this contrived example:
enter image description here
This is a table. I would like the value in col2 to be coloured green if it is equal to the value in col1, and I'd like to use conditional formatting to do it. Essentially I want it to look like this:
enter image description here

I attempted to "Use a formula to determine which cells to format", the formula is =INDIRECT("Table1[col1]")=INDIRECT("Table1[col2]"):
enter image description here

But none of the cells changed their formatting.

Anyone know how to do this?



Top Answer/Comment:

Include the table name and add the @ symbol to reference row for row.

=INDIRECT("Table1[@col1]")=INDIRECT("Table1[@col2]")

enter image description here
    click for larger image

상단 광고의 [X] 버튼을 누르면 내용이 보입니다