Consulting

Results 1 to 3 of 3

Thread: Pasting and editing data formats in excel

  1. #1
    VBAX Newbie
    Joined
    Jan 2019
    Posts
    2
    Location

    Pasting and editing data formats in excel

    Hi,

    My colleague is pasting data from InDesign into excel cells.
    The data is in bullet points originally, however, they don't display when pasting (which isn't a issue)

    However, the data is pasting across as separate lines when inputting into the cell.

    i.e.
    Water repellent
    Steel toe cap midsole
    Leather upper

    I want the data in one cell, but paragraph style with full stops at end of sentences

    i.e Water repellent. Steel toe cap midsole. Leather upper.

    Thanks in advance

    Gemma

  2. #2
    VBAX Expert
    Joined
    May 2016
    Posts
    604
    Location
    try this, I suggest you assign a short cut key to the macor then you just select the lines you wnat to join and run the macro with a control key
    Sub test()
    Dim cel As Range
    Dim selectedRange As Range
    
    
        Set selectedRange = Application.Selection
      outstr = ""
        For Each cel In selectedRange.Cells
            outstr = outstr & cel.Value & ". "
        Next cel
        selectedRange = ""
       rono = selectedRange.Row
       colno = selectedRange.Column
       Cells(rono, colno) = outstr
    
    
    End Sub

  3. #3
    VBAX Newbie
    Joined
    Jan 2019
    Posts
    2
    Location
    ok, thanks.ill give that a try.

Posting Permissions

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