To compare two columns in Excel, you can use the "=equal to" operator. For example, if you want to compare the values in the "A" column and the "B" column, you can type "=A=B" into the "C1" cell. If the values are equal, the cell will show a green checkmark. If the values are not equal, the cell will show a red cross. You can also use the ">", "<", ">=", and "<=" operators to compare the values in two columns.