PC Review


Reply
Thread Tools Rate Thread

Copying cell contents from many cells and pasting into one cell

 
 
MDN
Guest
Posts: n/a
 
      10th Dec 2007
Hello

I'd like to copy the contents from a group of cells and then paste all of
those contents into one cell on a different worksheet. How can I do this?
 
Reply With Quote
 
 
 
 
Pete_UK
Guest
Posts: n/a
 
      10th Dec 2007
I think you would need a formula, something like:

=Sheet1!A1&Sheet1!A2&Sheet1!A3 etc.

Hope this helps.

Pete

On Dec 10, 7:23 pm, MDN <M...@discussions.microsoft.com> wrote:
> Hello
>
> I'd like to copy the contents from a group of cells and then paste all of
> those contents into one cell on a different worksheet. How can I do this?


 
Reply With Quote
 
Don
Guest
Posts: n/a
 
      10th Dec 2007
have you tried to Concatenate

example: =Concatenate(A1,B2,C3)
or =A1&B2&C3

"MDN" wrote:

> Hello
>
> I'd like to copy the contents from a group of cells and then paste all of
> those contents into one cell on a different worksheet. How can I do this?

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      10th Dec 2007
You could just combine using a formula on destination sheet.

=Sheet1!A1 & Sheet1!B1 and Sheet1!C1 etc.

Or a User Defined Function.......................

Function ConCatRange(CellBlock As Range) As String
Dim Cell As Range
Dim sbuf As String
For Each Cell In CellBlock
If Len(Cell.text) > 0 Then sbuf = sbuf & Cell.text & " "
Next
ConCatRange = Left(sbuf, Len(sbuf) - 1)
End Function

=Sheet1!(A1:A10)

Or a macro.............................

Sub ConCat_Cells()
Dim x As Range
Dim y As Range
Dim z As Range
Dim w As String
Dim sbuf As String
On Error GoTo endit
w = InputBox("Enter the Type of De-limiter Desired")
Set z = Application.InputBox("Select Destination Cell", _
"Destination Cell", , , , , , 8)
Application.SendKeys "+{F8}"
Set x = Application.InputBox("Select Cells, Contiguous or Non-Contiguous", _
"Cells Selection", , , , , , 8)
For Each y In x
If Len(y.text) > 0 Then sbuf = sbuf & y.text & w
Next
z = Left(sbuf, Len(sbuf) - Len(w))
Exit Sub
endit:
MsgBox "Nothing Selected. Please try again."
End Sub


Gord Dibben MS Excel MVP

On Mon, 10 Dec 2007 11:23:04 -0800, MDN <(E-Mail Removed)> wrote:

>Hello
>
>I'd like to copy the contents from a group of cells and then paste all of
>those contents into one cell on a different worksheet. How can I do this?


 
Reply With Quote
 
Marcelo
Guest
Posts: n/a
 
      10th Dec 2007
try to use concatenate
assuming that you have one data base

a b

1 Many to
2 Things do
3
4 =a1&" "&a2&" "&b1&" "&b2

hth


--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"MDN" escreveu:

> Hello
>
> I'd like to copy the contents from a group of cells and then paste all of
> those contents into one cell on a different worksheet. How can I do this?

 
Reply With Quote
 
MDN
Guest
Posts: n/a
 
      10th Dec 2007
Thank you. Is is possible to Concatenate a large range of cells ? I have 75
cells that I want to put together. Does that mean I'll have to enter each
number into the formula or is there a way to do a range?


"Marcelo" wrote:

> try to use concatenate
> assuming that you have one data base
>
> a b
>
> 1 Many to
> 2 Things do
> 3
> 4 =a1&" "&a2&" "&b1&" "&b2
>
> hth
>
>
> --
> regards from Brazil
> Thanks in advance for your feedback.
> Marcelo
>
>
>
> "MDN" escreveu:
>
> > Hello
> >
> > I'd like to copy the contents from a group of cells and then paste all of
> > those contents into one cell on a different worksheet. How can I do this?

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      10th Dec 2007
Read my response.


Gord Dibben MS Excel MVP

On Mon, 10 Dec 2007 12:04:00 -0800, MDN <(E-Mail Removed)> wrote:

>Thank you. Is is possible to Concatenate a large range of cells ? I have 75
>cells that I want to put together. Does that mean I'll have to enter each
>number into the formula or is there a way to do a range?
>
>
>"Marcelo" wrote:
>
>> try to use concatenate
>> assuming that you have one data base
>>
>> a b
>>
>> 1 Many to
>> 2 Things do
>> 3
>> 4 =a1&" "&a2&" "&b1&" "&b2
>>
>> hth
>>
>>
>> --
>> regards from Brazil
>> Thanks in advance for your feedback.
>> Marcelo
>>
>>
>>
>> "MDN" escreveu:
>>
>> > Hello
>> >
>> > I'd like to copy the contents from a group of cells and then paste all of
>> > those contents into one cell on a different worksheet. How can I do this?


 
Reply With Quote
 
MDN
Guest
Posts: n/a
 
      10th Dec 2007
Thanks!

"Gord Dibben" wrote:

> You could just combine using a formula on destination sheet.
>
> =Sheet1!A1 & Sheet1!B1 and Sheet1!C1 etc.
>
> Or a User Defined Function.......................
>
> Function ConCatRange(CellBlock As Range) As String
> Dim Cell As Range
> Dim sbuf As String
> For Each Cell In CellBlock
> If Len(Cell.text) > 0 Then sbuf = sbuf & Cell.text & " "
> Next
> ConCatRange = Left(sbuf, Len(sbuf) - 1)
> End Function
>
> =Sheet1!(A1:A10)
>
> Or a macro.............................
>
> Sub ConCat_Cells()
> Dim x As Range
> Dim y As Range
> Dim z As Range
> Dim w As String
> Dim sbuf As String
> On Error GoTo endit
> w = InputBox("Enter the Type of De-limiter Desired")
> Set z = Application.InputBox("Select Destination Cell", _
> "Destination Cell", , , , , , 8)
> Application.SendKeys "+{F8}"
> Set x = Application.InputBox("Select Cells, Contiguous or Non-Contiguous", _
> "Cells Selection", , , , , , 8)
> For Each y In x
> If Len(y.text) > 0 Then sbuf = sbuf & y.text & w
> Next
> z = Left(sbuf, Len(sbuf) - Len(w))
> Exit Sub
> endit:
> MsgBox "Nothing Selected. Please try again."
> End Sub
>
>
> Gord Dibben MS Excel MVP
>
> On Mon, 10 Dec 2007 11:23:04 -0800, MDN <(E-Mail Removed)> wrote:
>
> >Hello
> >
> >I'd like to copy the contents from a group of cells and then paste all of
> >those contents into one cell on a different worksheet. How can I do this?

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying a cell contents down to the next non-blank cell Math Microsoft Excel Programming 2 21st Mar 2007 02:23 PM
Copying format to a new cell, w/o overwriting destination cell contents James C Microsoft Excel Misc 1 18th Oct 2005 08:02 PM
Copying and pasting cell contents Gazza Microsoft Excel Programming 2 1st Jun 2005 05:04 PM
Copying cell contents to add to existing contents in another cell =?Utf-8?B?RGVhbiBTYXdhcw==?= Microsoft Excel Programming 3 2nd Apr 2004 09:00 PM
Copying cell contents from a referred cell that is in reference to a "find" cell ZX210 Microsoft Excel Misc 1 26th Dec 2003 06:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:45 AM.