Reputation: 6707
My columns have line breaks, but how can I convert these to vbCrLf
when reading with Range("A" & r).Value
?
Upvotes: 2
Views: 6239
Reputation: 72514
In Excel cell line breaks are represended by vbLf
, not vbCrLf
.
You can replace the line breaks manually:
Dim CellValue As String
CellValue = Replace(Range("A" & r).Value, vbLf, vbCrLf)
That replaces all Excel line breaks with standard Windows line breaks.
Upvotes: 3