
Originally Posted by
anandmr65
Hi,
I want to insert a newline inside a cell using a formula.(similiar to ALT + Enter)
I have tried A2 & char(10) & B2. But this only gives a small square between them, and does not move the text to new line.
Could somebody help me on this. I am using VBA macros to inser the formulas.
Thanks for help in Advance
Regards
Anand
ActiveCell.FormulaR1C1 = "some text" & Chr(10) & "some next line text"
With ActiveCell.Characters(Start:=1, Length:=29).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
works for me
---
Bookmarks