View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jake Marx[_3_] Jake Marx[_3_] is offline
external usenet poster
 
Posts: 860
Default Char(13) displaying as square in Excel

Hi Leslie,

Your subject line indicates CHAR(13), and your message indicates CHAR(10).
For vbCrLf, you need both (13 first, then 10):

=IF(B2=F2,A2,CONCATENATE(A2, CHAR(13) & CHAR(10), B2) )

Does that work as expected?

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]

Leslie wrote:
We are using Excel to load data into SQL.

We are using the Concatenate function to join a couple columns of
data and we want to put a CRLF (Carriage Return, Line Feed) after the
first column (line) of data.

=IF(B2=F2,A2,CONCATENATE(A2, CHAR(10), B2) )

This data will be loaded into a nvarchar field (notes) in SQL. I
know about using the 'wrap text' formatting to get rid of the square
box display in Excel and display the text as two lines. However,
when we import this data into the SQL database, the square box is
what is displayed, and the data is not being put on two separate
lines.

Anyone ever encountered this problem and have any solutions?

Thanks,
Leslie Fournier
Oregon Aero, Inc.