View Single Post
  #4   Report Post  
Rob
 
Posts: n/a
Default

I see! I had hoped to avoid the messy creation of new columns.

Data is provided from a database where it outputs the first name data for
all people in one cell using carriage returns, then middle name data for all
people in the next cell on the row, and similarly with the surname.

Thinking about the output once again, I would actually quite like it in a
similarly messy carriage return type format as the data concatenated from
each row will be feeding through to present on individual Powerpoint
presentation slides.

Ashish, where would be the best starting point with VBA?

Many thanks
Rob

"Ashish Mathur" wrote:

Hi,

This is an interesting problem to solve. Here is how you can do it.

You will basically have to segregate the data in each cell (entered via Alt
Enter) into various columns. This can be done by using the text to columns
feature (in the the data revenue). Follow the undermentioned procedure

Select delimited in the the text to columns box (Data menu)
In other, enter Alt+010 and finish

This will segregate the data in each cell into various columns.

Regards,


Ashish Mathur

"Rob" wrote:

Hi all,

I want to concatenate text in three columns, which would normally be simple.
However, if we take the cells across the three columns, each contains a set
of data using carriage returns (Alt-Enter).

To put some context on the problem, A is First Name, B is Middle Name, C is
Surname.

The data would look like:
A B C
1 David Robert Hughes
Mark Dave Marriott
Martin Benjamin Murray
2 Shaun Andrew Flannagan
Alison Jane Martin

So I would like to combine the data into some sort of output that will lead
to the following, with each :
1 David Robert Hughes
Mark Dave Marriott
Martin Benjamin Murray
2 Shaun Andrew Flannagan
Alison Jane Martin

It is worth noting that some cells may contain 5 entries using carriage
returns, while others may have 2.

Is anyone able to help?

Many thanks,

Rob