How to change cell format correctly?

For example:

A1=1
B1=1
C1=IF(A1=B1,“true”,“false”)

They all are of number format (default), and now the result of C1 is “true”.

Then I set the format of A1 as text format, and I think the result of C1 should be “false” but it’s not.

How to change cell format correctly?

Calc Version: 6.2.8.2

You are confusing format and data type.

Formatting is primarily intended to adjust the way cell content is displayed. In a few cases it also governs how new input is interpreted.

In the special case of “text”, the format also governs data type for new input to the cell.

Formatting a cell will never change existing cell content, but only render it differently if the format dictates that.

To change a number 1 to a textual "1", edit the cell and insert a leading apostrophe. '1

Thank you, keme.
Forgive my ignorance. XD

Ignorance is in most situations not an offense. No apology required.

We are all ignorant in many fields. Identifying and acknowledging own ignorance is the most important step towards enlightenment. You are doing good.:relaxed: