View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Trimming text from the end of cell contents.

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))

--
Rick (MVP - Excel)


"Eduardo" wrote in message
...
Hi,
assuming your test start in cell A1 in B1 enter

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

if this helps please clikc yes thanks

"Colin Hayes" wrote:


Hi

I need help with a small problem.

I have a column which has rows each of which end with 'Ref : ' and then
a number.

I'd like to be able to trim all of this from the end of each cell ,
leaving the rest of the cell content intact.

Can someone help?

Grateful for any advice.



Best Wishes