CONCATENATING CELL CONTENTS !

J

jay dean

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 ***
 
G

Gord Dibben

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top