PC Review


Reply
Thread Tools Rate Thread

CONCATENATING CELL CONTENTS !

 
 
jay dean
Guest
Posts: n/a
 
      12th Apr 2009
Hello -

Each cell in Range ("A5:A80") contains words or phrases.
I am trying to create a sentence in Range ("D3") using cells from Range
("A5:A80").
I need a macro that will copy the contents of any cell that I select in
Range ("A5:A80") and paste it in Range ("D3"). If Range("D3") already
contains some words, it will leave a space at the end of those words and
concatenate the cell content it copied in range ("A5:A80").

Any help would be appreciated. Thanks!

Jay Dean



*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      12th Apr 2009
Sub Add_Copied_Text()
Dim Cell As Range
Dim moretext As String
Dim rngEdit As Range
'select a cell with text
Set currentSelection = Application.ActiveCell
currentSelection.Name = "oldrange"
moretext = Range("oldrange").Value
'select a cell to satrt the fill
Set rngEdit = Range("D3")
rngEdit.Value = rngEdit.Value & " " & Range("oldrange").Value
End Sub


Gord Dibben MS Excel MVP

On Sat, 11 Apr 2009 18:50:46 -0700, jay dean <(E-Mail Removed)> wrote:

>Hello -
>
>Each cell in Range ("A5:A80") contains words or phrases.
>I am trying to create a sentence in Range ("D3") using cells from Range
>("A5:A80").
>I need a macro that will copy the contents of any cell that I select in
>Range ("A5:A80") and paste it in Range ("D3"). If Range("D3") already
>contains some words, it will leave a space at the end of those words and
>concatenate the cell content it copied in range ("A5:A80").
>
>Any help would be appreciated. Thanks!
>
>Jay Dean
>
>
>
>*** Sent via Developersdex http://www.developersdex.com ***


 
Reply With Quote
 
jay dean
Guest
Posts: n/a
 
      12th Apr 2009
Gord, thanks a boat load.
It works beautifully!!!

Jay Dean

*** Sent via Developersdex http://www.developersdex.com ***
 
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
Concatenating & trim contents of 2 textboxes and write in another =?Utf-8?B?TWVtZW50bw==?= Microsoft Access VBA Modules 5 17th Aug 2007 02:09 AM
concatenating from a different cell within the same row method373 Microsoft Excel Misc 6 16th Feb 2006 10:24 PM
excel displays cell contents but won't print cell contents =?Utf-8?B?RGpq?= Microsoft Excel Crashes 0 18th Nov 2005 01:56 AM
Concatenating Cell COmments =?Utf-8?B?SmVmZg==?= Microsoft Excel Programming 2 20th Jan 2005 09:34 AM
referencing cell contents, after deleting and shifting new contents into cell HM Microsoft Excel Misc 1 6th Feb 2004 10:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:21 AM.