View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default Line Feed in Formula Bar

Try Chr(10)

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Stratuser" wrote in message
...
I'm having a problem dealing with an imported file that contains strings
that
have a some kind of line feed in the formula bar. For example, the words
"ADR Ticker" appear on two different lines inside the formula bar,
apparently
with a line feed between them, and unless I manually go into the formula
bar
and eliminate the line feed, the string in the cell does not equal "ADR
Ticker" without a line feed.

I tried inserting Chr(13) into my string formula in VBA, as shown below,
but
it didn't work:

If Trim(Range("F3").Value) < "ADR " & Chr(13) & "Ticker" Then
...do something


Any ideas will be appreciated.