Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Finding text in a cell and returning a value based on that text

I'm trying to create a formula that will look at the cell containing
the text "B46292P" and if it finds the letter "P", return the word
"Paperback". Can anyone help me? If it helps, the P would always be in
the last position in the cell. However, sometimes, I would need to find
letters that would be in the last 2 positions in the cell to return a
value.

Thanks so much for any help!!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Finding text in a cell and returning a value based on that text

=IF((LEN(A1)-LEN(SUBSTITUTE(A1,"P",""))0,"Paperback","")

Sitaram

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 93
Default Finding text in a cell and returning a value based on that text

If you want it regardless of where the P is
=IF(FIND("p",A1)<"","Paperback","")


--
--
-John
Please rate when your question is answered to help us and others know what
is helpful.

wrote in message
oups.com...
I'm trying to create a formula that will look at the cell containing
the text "B46292P" and if it finds the letter "P", return the word
"Paperback". Can anyone help me? If it helps, the P would always be in
the last position in the cell. However, sometimes, I would need to find
letters that would be in the last 2 positions in the cell to return a
value.

Thanks so much for any help!!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Finding text in a cell and returning a value based on that text

Thank you so much! This worked perfectly!

Lori


P Sitaram wrote:
=IF((LEN(A1)-LEN(SUBSTITUTE(A1,"P",""))0,"Paperback","")

Sitaram


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Finding text in a cell and returning a value based on that text

One mo

=if(countif(a1,"*p*")0,"Paperback","not-paperback")



" wrote:

I'm trying to create a formula that will look at the cell containing
the text "B46292P" and if it finds the letter "P", return the word
"Paperback". Can anyone help me? If it helps, the P would always be in
the last position in the cell. However, sometimes, I would need to find
letters that would be in the last 2 positions in the cell to return a
value.

Thanks so much for any help!!


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Finding text in a cell and returning a value based on that text

Just a note to the OP:

This will actually search for a lower case "p".

Change Find to Search if you want to find either P or p.

Or just make that "p" into a "P" if you want to match uppercase P.

ps. The =countif() suggestion is not case sensitive, either.

John Bundy wrote:

If you want it regardless of where the P is
=IF(FIND("p",A1)<"","Paperback","")

--
--
-John
Please rate when your question is answered to help us and others know what
is helpful.

wrote in message
oups.com...
I'm trying to create a formula that will look at the cell containing
the text "B46292P" and if it finds the letter "P", return the word
"Paperback". Can anyone help me? If it helps, the P would always be in
the last position in the cell. However, sometimes, I would need to find
letters that would be in the last 2 positions in the cell to return a
value.

Thanks so much for any help!!


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
finding cell value in another column and returning a true or fals bajanswing Excel Worksheet Functions 2 November 17th 06 08:33 PM
returning either a shaded cell &/or a text d_kight Excel Discussion (Misc queries) 1 June 12th 06 01:52 PM
Returning Cell Value if someone deletes the contents of a cell mmc308 Excel Worksheet Functions 4 March 31st 06 06:41 PM
Returning a Value to a Cell Based on a Range of Uncertain Size amc422 Excel Worksheet Functions 7 November 14th 04 03:03 PM
returning a text cell based on a number cell Josh7777777 Excel Worksheet Functions 2 November 2nd 04 07:42 PM


All times are GMT +1. The time now is 03:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"