#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default Find Function

I am using the following formula to search for a "<" in a cell and then trip
off all text after it is found:

=IF(FIND("<",C11,1)-1,(TRIM(LEFT(C11,FIND("<",C11,1)-1))),C11)

My intention is that if there is no "<", then just return what is in the
cell originally.

It trim part works but if there is no "<" in the cell, then I get a #Value
error.

Any ideas?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 229
Default Find Function

=IF(isna(FIND("<",C11,1)),(TRIM(LEFT(C11,FIND("<", C11,1)-1))),C11)
best wishes
sreedhar

"Jeff Gross" wrote:

I am using the following formula to search for a "<" in a cell and then trip
off all text after it is found:

=IF(FIND("<",C11,1)-1,(TRIM(LEFT(C11,FIND("<",C11,1)-1))),C11)

My intention is that if there is no "<", then just return what is in the
cell originally.

It trim part works but if there is no "<" in the cell, then I get a #Value
error.

Any ideas?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default Find Function

That did it - thanks a lot.

Jeff

"yshridhar" wrote:

=IF(isna(FIND("<",C11,1)),(TRIM(LEFT(C11,FIND("<", C11,1)-1))),C11)
best wishes
sreedhar

"Jeff Gross" wrote:

I am using the following formula to search for a "<" in a cell and then trip
off all text after it is found:

=IF(FIND("<",C11,1)-1,(TRIM(LEFT(C11,FIND("<",C11,1)-1))),C11)

My intention is that if there is no "<", then just return what is in the
cell originally.

It trim part works but if there is no "<" in the cell, then I get a #Value
error.

Any ideas?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 229
Default Find Function

you are most welcome. thanks for your feedback

"Jeff Gross" wrote:

That did it - thanks a lot.

Jeff

"yshridhar" wrote:

=IF(isna(FIND("<",C11,1)),(TRIM(LEFT(C11,FIND("<", C11,1)-1))),C11)
best wishes
sreedhar

"Jeff Gross" wrote:

I am using the following formula to search for a "<" in a cell and then trip
off all text after it is found:

=IF(FIND("<",C11,1)-1,(TRIM(LEFT(C11,FIND("<",C11,1)-1))),C11)

My intention is that if there is no "<", then just return what is in the
cell originally.

It trim part works but if there is no "<" in the cell, then I get a #Value
error.

Any ideas?


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default Find Function

Actually it fixed the original problem but created a new one.

If there is not a "<", then the formula works properly. If there is a "<",
then the trim does not work.

Any ideas on rearranging the formula?

Jeff

"yshridhar" wrote:

you are most welcome. thanks for your feedback

"Jeff Gross" wrote:

That did it - thanks a lot.

Jeff

"yshridhar" wrote:

=IF(isna(FIND("<",C11,1)),(TRIM(LEFT(C11,FIND("<", C11,1)-1))),C11)
best wishes
sreedhar

"Jeff Gross" wrote:

I am using the following formula to search for a "<" in a cell and then trip
off all text after it is found:

=IF(FIND("<",C11,1)-1,(TRIM(LEFT(C11,FIND("<",C11,1)-1))),C11)

My intention is that if there is no "<", then just return what is in the
cell originally.

It trim part works but if there is no "<" in the cell, then I get a #Value
error.

Any ideas?




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
Find Function [email protected] Excel Worksheet Functions 2 September 14th 07 08:26 PM
Need to find a function. MikeCampbell Excel Worksheet Functions 2 January 29th 07 01:40 AM
#VALUE about function Find hui Excel Worksheet Functions 14 September 12th 06 04:01 PM
Find function alamo Excel Worksheet Functions 1 September 16th 05 02:01 PM
Help with the FIND function Ranger Excel Worksheet Functions 1 February 25th 05 03:24 PM


All times are GMT +1. The time now is 11:47 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"