I'm having trouble trying to use replace characters in MS excel. Help says *
and ?
can both replace characters, but if I try using them in IF
, I don't get correct results.
For example:
A1="something"
=IF(A1="*mething";"yes";"no")
I always get no
... How to use *
correctly?
wildcards don't work with comparison operators like =
To achieve what you want you can use COUNTIF which does accept wildcards, i.e.
=IF(COUNTIF(A1;"*mething")>0;"yes";"no")
or RIGHT function like
=IF(RIGHT(A1;7)="mething";"yes";"no")
Wildcards cannot be used in this context. Use something like:
=IF(ISERROR(FIND("mething",A1)),"No","Yes")
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