search for text then return text

R

r2rcode

i need a fomula that will search down a specified cells in a column... look
at the words in each cell and then display the text i want. for instance...
I have a column with words in it and i want it to search through each
cell/word for the letter "P"... then i want it to display a "P". if there
are one or many instances where a "P" is in that column I want to only
display "P".
 
T

T. Valko

Maybe something like this...

=IF(SUMPRODUCT(--(ISNUMBER(SEARCH("P",A1:A20)))),"P","")

In this formula case is not a factor. P and p are equal.

If you want it so that case is a factor just replace SEARCH with FIND.
 

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