find text, display text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to find text within a cell and, if found, display a text message of my
choosing. For instance, if A1 has the txt "Special Price", then I want B1 to
say, "Special." If it says "Regular Price", I want B1 to say "Reg."
Thanks!
 
One way

Put in B1:

=IF(TRIM(A1)="Special Price","Special",IF(TRIM(A1)="Regular
Price","Reg",A1))

Above assumes that A1 contains neither Special Price"
nor "Regular Price", the value in A1 is to be returned
 
Above assumes that A1 contains neither Special Price"
nor "Regular Price", the value in A1 is to be returned

Oops, typo (missing "if") in above lines, should read as:
 

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

Back
Top