Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default how to merge many cells to one cell with keeping all data

Dear all,

I meet a question about following.
in A column, there are many data(some data are same), and in B column,
there are many relevant data, but they are different, how to merge all
the revelant data to one cell in B column with the same in A column,
thanks in advance!

For example

A B
123 R1
123 R2
123 R3
123 R4
124 L1
124 L2
124 L3
125 C1
125 C2
. .
. .
. .


BR
Valley

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 100
Default how to merge many cells to one cell with keeping all data

Question not clear !!!

What output you are expecting???



"Valley" wrote:

Dear all,

I meet a question about following.
in A column, there are many data(some data are same), and in B column,
there are many relevant data, but they are different, how to merge all
the revelant data to one cell in B column with the same in A column,
thanks in advance!

For example

A B
123 R1
123 R2
123 R3
123 R4
124 L1
124 L2
124 L3
125 C1
125 C2
. .
. .
. .


BR
Valley


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default how to merge many cells to one cell with keeping all data

Dear,

I meet a question about following.
in A column, there are many data(some data are same), and in B column,
there are many relevant data, but they are different, how to merge all
the revelant data to one cell in B column with the same in A column,
thanks in advance!

For example

A B C
123 R1 R1 R2 R3 R4
123 R2
123 R3
123 R4
124 L1 L1 L2 L3
124 L2
124 L3
125 C1 C1 C2
125 C2
. .
. .
. .

but I know to do them with C1=B1&" "&B2&" "&B3&" "&B4 one by one, I
want to know how to do easily.

BR
Valley

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 296
Default how to merge many cells to one cell with keeping all data


With the data below starting in row 2 put in C2
=IF(A2=A1,C1&" "&B2,B2)

Now conditionally format C2 and choose the formula is option and
enter
=$A2=$A3

set the font colour to white, or whatever is the colour of your
background and copy C2 down your data


All the cells in column C of course contain data, it's just that you
can't see the other cells.

What you see is the following. It's not quite the same as your exact
requirement which is to have the data on the first row of a 'block' of
similar A values, but you may be able to work with this.

A VBA macro could be written to meet your originally requirement
exactly. If that's what you want just re-post back

HTH


123 R1
123 R2
123 R3
123 R4 R1 R2 R3 R4
124 L1
124 L2
124 L3 L1 L2 L3
125 C1
125 C2 C1 C2





On 25 Aug 2006 06:02:22 -0700, "Valley" wrote:

Dear,

I meet a question about following.
in A column, there are many data(some data are same), and in B column,
there are many relevant data, but they are different, how to merge all
the revelant data to one cell in B column with the same in A column,
thanks in advance!

For example

A B C
123 R1 R1 R2 R3 R4
123 R2
123 R3
123 R4
124 L1 L1 L2 L3
124 L2
124 L3
125 C1 C1 C2
125 C2
. .
. .
. .

but I know to do them with C1=B1&" "&B2&" "&B3&" "&B4 one by one, I
want to know how to do easily.

BR
Valley


__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default how to merge many cells to one cell with keeping all data

Thank you very much! this is a good way. :-)

BR
Valley


Richard Buttrey wrote:
With the data below starting in row 2 put in C2
=IF(A2=A1,C1&" "&B2,B2)

Now conditionally format C2 and choose the formula is option and
enter
=$A2=$A3

set the font colour to white, or whatever is the colour of your
background and copy C2 down your data


All the cells in column C of course contain data, it's just that you
can't see the other cells.

What you see is the following. It's not quite the same as your exact
requirement which is to have the data on the first row of a 'block' of
similar A values, but you may be able to work with this.

A VBA macro could be written to meet your originally requirement
exactly. If that's what you want just re-post back

HTH


123 R1
123 R2
123 R3
123 R4 R1 R2 R3 R4
124 L1
124 L2
124 L3 L1 L2 L3
125 C1
125 C2 C1 C2





On 25 Aug 2006 06:02:22 -0700, "Valley" wrote:

Dear,

I meet a question about following.
in A column, there are many data(some data are same), and in B column,
there are many relevant data, but they are different, how to merge all
the revelant data to one cell in B column with the same in A column,
thanks in advance!

For example

A B C
123 R1 R1 R2 R3 R4
123 R2
123 R3
123 R4
124 L1 L1 L2 L3
124 L2
124 L3
125 C1 C1 C2
125 C2
. .
. .
. .

but I know to do them with C1=B1&" "&B2&" "&B3&" "&B4 one by one, I
want to know how to do easily.

BR
Valley


__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to merge many cells to one cell with keeping all data Valley Excel Worksheet Functions 1 December 3rd 06 07:41 PM
how to merge many cell to one cell with keeping all data Valley Excel Worksheet Functions 0 August 25th 06 01:12 PM
Macro question Chris Excel Worksheet Functions 12 July 7th 06 01:23 AM
Inputting data to one worksheet for it effect another daedalus1 Excel Discussion (Misc queries) 1 June 25th 06 04:39 PM
taking data from multiple cells and displaying in one cell djarcadian Excel Discussion (Misc queries) 2 May 30th 06 09:31 PM


All times are GMT +1. The time now is 09:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"