View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Kevin B Kevin B is offline
external usenet poster
 
Posts: 1,316
Default Merging multiple cells with text

Try a formula like this:

=TRIM(A1&" "&B1&" "&C1&" "&D1&" "&E2)

The TRIM formula will remove any leading & trailing spaces and the &" "&
places a literal space between each of the cell entries. If you don't need
any spaced between cell entries use the following:

=TRIM(A1&B1&C1&D1&E2)

--
Kevin Backmann


"Gaetan" wrote:

Hi,

I have many files that contains cells in which sentences were split in
multiple contiguous cells. As an example, I have "How are" in A1, "you doing"
in A2 and "today?" in A3. I need to merge these 3 cells by keeping the
content of A1, A2 and A3 into A1. There could be a variable quantity of cells
I need to merge in this manner. This means, sometimes it can be 3, sometimes
4, and so on.

I know some VBA code could help me do this and save me valuable time but I
am unsure where to start with this.

Can anyone help me?

Thanks in advance!