Change Column value from 1 to 0

Viewed 53

I have a column with 1 and 0 that I would like to change to the opposite.

|This   |Should be|
| 0     |1        |
| 1     |0        |
| 0     |1        |
| 1     |0        |
| 0     |1        |

I tried to do =ARRAYFORMULA(SUBSTITUTE(A2:A,"0","1","")) But this changes all the values to 0, same thing if I do the Replace function :(

Any suggestions?

Thanks in advance

2 Answers

use:

=INDEX(IF(A1:A="",,IF(A1:A*1=1, 0, 1)))

enter image description here

or:

=INDEX(IF(A1:A="",,N(A1:A*1=0)))

enter image description here

Try:

=-A1+1

enter image description here

I did it on Excel but it should work perfectly on Google Sheets.

Related