View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
M John M John is offline
external usenet poster
 
Posts: 35
Default macro code for grouping adjacent cells into one multi-line cel

You are a hero. Solution works perfectly. Many thanks.

M John

"sebastienm" wrote:

Hi,
Go throught the following steps:
-Assuming the data is in cell A1, A2, A3
-using CHAR(10) to get a newline in the cell
- make sure the cell is formatted for 'wrap text':
menu FormatCell, tab Alignment, checkbox 'Wrap Text'
- formula
=CONCATENATE( A1 , CHAR(10) , B1 , CHAR(10) , C1 )
or
= A1 & CHAR(10) & B1 & CHAR(10) & C1

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"M John" wrote:

I am trying to come up with a way to combine cells into one multi-line cell
via a macro or a combination of worksheet functions. I know about
"alt-enter" and vaguely understand "offset". Is there a way to do this?

example:
cell1 cell2 cell3 cell4
1
1 2 3 2
3
Many thanks in advance.