+ Reply to Thread
Results 1 to 7 of 7

VBA for Line Break (Alt- Enter)

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: VBA for Line Break (Alt- Enter)

    Just for fun.. without a loop..

    Private Sub CommandButton1_Click()
     With Range("D1:D" & Range("D" & Rows.Count).End(xlUp).Row)
      .Offset(, 1).Resize(.Rows.Count) = Split(Chr(10) & Replace(Join(Application.Transpose(.Value), Chr(10)), Chr(10), Chr(10) & "|" & Chr(10)), "|")
     End With
    End Sub

  2. #2
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    387

    Re: VBA for Line Break (Alt- Enter)

    Thanks Apo,

    It worked brillianty ! Thanks everyone

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Enter Line-Break [Alt + Enter] at specific location
    By jewelsharma in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-27-2014, 12:23 AM
  2. [SOLVED] VBA to insert line break (Alt+Enter)
    By TextMonkey in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-12-2014, 01:18 PM
  3. [SOLVED] ALT+ENTER = line break
    By Nyla in forum Excel General
    Replies: 5
    Last Post: 05-23-2006, 05:45 PM
  4. Replies: 3
    Last Post: 05-08-2006, 07:25 PM
  5. How do I enter a line break within a cell?
    By Striving for efficiency in forum Excel General
    Replies: 4
    Last Post: 11-17-2005, 04:15 PM

Tags for this Thread

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