PDA

View Full Version : Pasting and editing data formats in excel



gemlb
01-17-2019, 05:58 AM
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

offthelip
01-18-2019, 04:30 PM
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

gemlb
01-21-2019, 07:07 AM
ok, thanks.ill give that a try.