Find Function

S

SJT

I would like to find the second occurence of a specific alphanumeric
character in a cell. For example, if cell A1 contains "BOBBY" what would be
the formula for finding the second occurence of the letter "B". Thank you
advance for your assistance. Greatly appreciated
 
N

Niek Otten

=FIND("#",SUBSTITUTE(A1,"B","#",2))

Replace # by another symbol if it can be part of your text
 
×

מיכ×ל (מיקי) ×בידן

In cell B1 try: =FIND("B",A9,2)
Micky
 
L

Luke M

=FIND("B",SUBSTITUTE(A1,"B",CHAR(160),1))

Note that CHAR(160) is simply a non-printable character rarely used in
normal usage. The formula replaces the first instance of desired letter, and
then finds the 2nd instance. Alternatively:

=FIND(CHAR(160),SUBSTITUTE(A1,"B",CHAR(160),2))

Could be used, if you want to control which instance of the letter to find
(by simply changing the last arguement)
 
×

מיכ×ל (מיקי) ×בידן

A9 should read: A1
Micky


מיכ×ל (מיקי) ×בידן said:
In cell B1 try: =FIND("B",A9,2)
Micky
 
S

SJT

Thank you Niek.

Niek Otten said:
=FIND("#",SUBSTITUTE(A1,"B","#",2))

Replace # by another symbol if it can be part of your text

--
Kind regards,

Niek Otten
Microsoft MVP - Excel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top