View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Colin Hayes Colin Hayes is offline
external usenet poster
 
Posts: 465
Default Trimming text from the end of cell contents.

In article , Rick Rothstein
writes
You should add the colon after the "Ref" so as to avoid false positives with
words such as "refined", "bereft", and so on. The only problem is to know
where the colon goes... the OP shows a space between the "f" and the
colon... I'm willing to bet that is a typo. Assuming the colon follows the
"f" immediately, the OP should probably use...

=TRIM(LEFT(A1,FIND("Ref:",A1)-1))


Hi All

OK thanks for your suggestions - all of which did the trick and solved
my problem. It works perfectly.

Just a FYI - there *is* a space after 'Ref' and before the colon , so I
was able to modify slightly the code to fit.

Not sure what 'OP' means....

^_^


Thanks again.