Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel: find 'a' or 'b' in a cell

Tags:

excel

Using the 'find' formula in Excel, is it possible to say find either 'a' or 'b' in a cell (without using vba)?

For ex;

A1 = 'West 1'

I tried Find(OR("1","2"),A1) but that threw an error.

like image 835
richie Avatar asked Feb 13 '23 10:02

richie


1 Answers

You can use this array formula to returns first position of any character from the list:

=MIN(IFERROR(FIND({"1","2","3"},A1),""))

press CTRL+SHIFT+ENTER to evaluate it.

It returns 0 if nothing found.

like image 189
Dmitry Pavliv Avatar answered Feb 25 '23 05:02

Dmitry Pavliv