Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
bob
 
Posts: n/a
Default Finding Partial Text in a Cell

I want to check a cell for the word "Total." The cell contains additional
text before the word Total. If the Total is found, I want to populate the
cell containing the formula with 1. If not, populate it with 0.

What is the formula for this?

The IF fundtion doesn't seem to include a way to find partial text strings.
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

=IF(ISNUMBER(SEARCH("Total",A1)),1,0)

or without IF

=--ISNUMBER(SEARCH("Total",A1))


Regards,

Peo Sjoblom


"bob" wrote:

I want to check a cell for the word "Total." The cell contains additional
text before the word Total. If the Total is found, I want to populate the
cell containing the formula with 1. If not, populate it with 0.

What is the formula for this?

The IF fundtion doesn't seem to include a way to find partial text strings.

  #3   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
try
=--ISNUMBER(FIND("Total",A1))

--
Regards
Frank Kabel
Frankfurt, Germany

bob wrote:
I want to check a cell for the word "Total." The cell contains
additional text before the word Total. If the Total is found, I want
to populate the cell containing the formula with 1. If not, populate
it with 0.

What is the formula for this?

The IF fundtion doesn't seem to include a way to find partial text
strings.



  #4   Report Post  
Nitin Harkawat
 
Posts: n/a
Default

=if(search("Total",a1)=1,1,0)
where cell A1 contains the text
"bob" wrote in message
...
I want to check a cell for the word "Total." The cell contains additional
text before the word Total. If the Total is found, I want to populate the
cell containing the formula with 1. If not, populate it with 0.

What is the formula for this?

The IF fundtion doesn't seem to include a way to find partial text
strings.



  #5   Report Post  
Harlan Grove
 
Posts: n/a
Default

"Nitin Harkawat" wrote...
=if(search("Total",a1)=1,1,0)
where cell A1 contains the text

....

If A1 doesn't contain the substring Total, SEARCH will return a #VALUE!
error, so your formula would evaluate to #VALUE! rather than 0.




  #6   Report Post  
Harlan Grove
 
Posts: n/a
Default

"bob" wrote...
I want to check a cell for the word "Total." The cell contains additional
text before the word Total. If the Total is found, I want to populate the
cell containing the formula with 1. If not, populate it with 0.

....

If Total always appears at the end of the string, try

=--(RIGHT(TRIM(x),5)="Total")

Otherwise, another alternative using only one function call,

=--(SUBSTITUTE(x,"Total","")<x)


  #7   Report Post  
Soo Cheon Jheong
 
Posts: n/a
Default

Hi,


=COUNTIF(A1,"*Total")

or

=COUNTIF(A1,"*Total*")


--
Regards,
Soo Cheon Jheong
_ _
^ąŻ^
--


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
Hide text that doesn't fit in the cell Rene Excel Discussion (Misc queries) 1 December 16th 04 04:34 PM
Moving text from one cell to another. estaban botas Excel Worksheet Functions 1 December 15th 04 02:04 PM
how to hyperlink text to a cell steve New Users to Excel 1 December 14th 04 08:21 PM
Formatting a cell as "text" in the number catagory. Ed Excel Worksheet Functions 3 December 7th 04 07:12 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 05:57 AM.

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"