Excel - Find String with wildcards

  powerless 19:33 15 Sep 10
Locked

In excel I can use Find() to find text in a cell, but it requires that I supply it with what I'm looking for.

The problem is that I'm looking for a 7 digit number that will will start with 21 or 61. The other 5 digits will be whatever they are.

Can excel find a 7 digit number that begins with 21 or 61 in a cell?

For example:

A1: EEE/12345 FF: 2144288 - (Should find: 2144288)
A2: UUU- 67890 - TT: 6152989 - (Should find: 6152989)
A3: TT: 6156759 YYY/LLL - (Should find: 6156759)

  Noldi 19:51 15 Sep 10

If you are using the find (Ctrl + F) then just put 16* or 21* that will find any number starting 16 or 21.

Noldi

  VoG II 19:55 15 Sep 10

Try

=IF(ISNUMBER(FIND("21",A1)),MID(A1,FIND("21",A1),8)+0,IF(ISNUMBER(FIND("61",A1)),MID(A1,FIND("61",A1),8)+0,""))

  VoG II 19:56 15 Sep 10

=IF(ISNUMBER(FIND("21",A1)),MID(A1,FIND("21",A1),7)+0,IF(ISNUMBER(FIND("61",A1)),MID(A1,FIND("61",A1),7)+0,""))

  Noldi 20:01 15 Sep 10

Sorry did read the question correctly. will look again. I think you can add the * to allow anything that follows the number you enter.

Noldi

  powerless 20:52 20 Sep 10

Thanks VoG, that worked.

Noldi - I ain't Ctrl - F it all ;)

  VoG II 21:04 20 Sep 10

Obviously a rare visitor here Chris. Me too.

I'm an F for lots of things :o)

This thread is now locked and can not be replied to.

Huawei P10 review

1995-2015: How technology has changed the world in 20 years

How Nearly Normal created super-fun papercraft for Google

47 iPhone camera tips to help you take better photos