#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default needed formula

I have a cell containing a string of text, we'll call it cell A1.
I need to put a formula in C1 that will search for only a part of the
text in A1 and, if found, will return the value in B1, or, if not
found, will return a value of zero (0).

I've tried SEARCH in combination with IF, but, if not found, keeps
returning the #VALUE! error symbol, which SEARCH does so if the string
of text is not found.

It would be used in my electronic checkbooks. Look for a part of the
text such as "Exxon" in the check or transaction description and, if
found, return the amount of the transaction in a new cell to be
further itemized.

Don't know what else to try.

-Mike
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default needed formula

Try this formula in C1:

=IF(ISERROR(SEARCH("Exxon",A1)),0,B1)

This will return 0 if Exxon is not found in A1, but if it is found
then it returns the value in B1.

Hope this helps.

Pete


On Dec 19, 12:25 am, Mikey wrote:
I have a cell containing a string of text, we'll call it cell A1.
I need to put a formula in C1 that will search for only a part of the
text in A1 and, if found, will return the value in B1, or, if not
found, will return a value of zero (0).

I've tried SEARCH in combination with IF, but, if not found, keeps
returning the #VALUE! error symbol, which SEARCH does so if the string
of text is not found.

It would be used in my electronic checkbooks. Look for a part of the
text such as "Exxon" in the check or transaction description and, if
found, return the amount of the transaction in a new cell to be
further itemized.

Don't know what else to try.

-Mike


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default needed formula

A1: (some text)

This formula returns the value in B1 if the
text "FindMe" appears anywhere in cell A1,
otherwise, it returns 0.

C1: =IF(COUNTIF(A1,"*FindMe*"),B1,0)

Another way....
D1: (text to find....eg FindMe)
C1: =IF(COUNTIF(A1,"*"&D1&"*"),B1,0)

Does that help?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)



"Mikey" wrote in message
...
I have a cell containing a string of text, we'll call it cell A1.
I need to put a formula in C1 that will search for only a part of the
text in A1 and, if found, will return the value in B1, or, if not
found, will return a value of zero (0).

I've tried SEARCH in combination with IF, but, if not found, keeps
returning the #VALUE! error symbol, which SEARCH does so if the string
of text is not found.

It would be used in my electronic checkbooks. Look for a part of the
text such as "Exxon" in the check or transaction description and, if
found, return the amount of the transaction in a new cell to be
further itemized.

Don't know what else to try.

-Mike




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default needed formula

On Tue, 18 Dec 2007 16:25:02 -0800 (PST), Mikey
wrote:

I have a cell containing a string of text, we'll call it cell A1.
I need to put a formula in C1 that will search for only a part of the
text in A1 and, if found, will return the value in B1, or, if not
found, will return a value of zero (0).

I've tried SEARCH in combination with IF, but, if not found, keeps
returning the #VALUE! error symbol, which SEARCH does so if the string
of text is not found.

It would be used in my electronic checkbooks. Look for a part of the
text such as "Exxon" in the check or transaction description and, if
found, return the amount of the transaction in a new cell to be
further itemized.

Don't know what else to try.

-Mike



=COUNTIF(A1,"*EXXON*")

(This is NOT case sensitive, so it will return 1 for Exxon, exxon, etc)
--ron
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default needed formula

On Tue, 18 Dec 2007 16:25:02 -0800 (PST), Mikey
wrote:

I have a cell containing a string of text, we'll call it cell A1.
I need to put a formula in C1 that will search for only a part of the
text in A1 and, if found, will return the value in B1, or, if not
found, will return a value of zero (0).

I've tried SEARCH in combination with IF, but, if not found, keeps
returning the #VALUE! error symbol, which SEARCH does so if the string
of text is not found.

It would be used in my electronic checkbooks. Look for a part of the
text such as "Exxon" in the check or transaction description and, if
found, return the amount of the transaction in a new cell to be
further itemized.

Don't know what else to try.

-Mike


Sorry, I misread. Try this instead:

=SUMIF(A1,"*EXXON*",B1)


--ron
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
IF AND Formula Help Needed Karen Smith Excel Discussion (Misc queries) 8 December 17th 07 07:09 PM
Formula Help Needed FordFiestaST150 Excel Worksheet Functions 1 November 3rd 06 08:41 AM
Formula Needed lsmith Excel Discussion (Misc queries) 1 June 8th 06 09:12 PM
Formula needed. Beertje Excel Discussion (Misc queries) 7 November 29th 05 09:54 AM
Formula needed audi Excel Discussion (Misc queries) 4 August 3rd 05 12:09 PM


All times are GMT +1. The time now is 07:50 PM.

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

About Us

"It's about Microsoft Excel"