View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Trim for Hard Returns

Use the Replace method

Replace(Range("A1").Value,CHR(13),"")

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Andrew" wrote in message
...
I have two columns (A & B), and I want to compare the data in values in
corresponding cells. Unfortunately, the values in cell A3 (for example)

may
have a hard return in it, but the value in cell B3 does not. I know that

the
trim function will remove spaces, but is there a way to remove hard

returns?
Does this make sense?