I quite often use a formula like:
=1*(A2=G2)
If A2 and G2 are the same then it returns 1
- otherwise it returns 0
.
I realise it is trivial with an IF
function but I'm specifically interested in this format of function using 1*
.
How can I amend it so that if A2 and G2 are NOT the same it returns 1
, otherwise 0
?
Use the <>
operator to check inequality:
=1*(A2<>G2)
You can just subtract the result from 1, to invert it
=1-1*(A2=G2)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With