Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use replace characters in excel?

Tags:

replace

excel

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?

like image 788
Róbert Soós Avatar asked Nov 02 '13 19:11

Róbert Soós


2 Answers

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")

like image 200
barry houdini Avatar answered Oct 22 '22 03:10

barry houdini


Wildcards cannot be used in this context. Use something like:

=IF(ISERROR(FIND("mething",A1)),"No","Yes")

like image 23
Gary's Student Avatar answered Oct 22 '22 04:10

Gary's Student