+ Reply to Thread
Results 1 to 2 of 2

Newline inside a Cell

Hybrid View

anandmr65 Newline inside a Cell 09-29-2006, 12:23 AM
Bryan Hessey ActiveCell.FormulaR1C1 =... 09-29-2006, 01:31 AM
  1. #1
    Registered User
    Join Date
    01-23-2006
    Posts
    35

    Newline inside a Cell

    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

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote 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
    ---

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1