Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default CONCATENATING CELL CONTENTS !

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 ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default CONCATENATING CELL CONTENTS !

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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default CONCATENATING CELL CONTENTS !

Gord, thanks a boat load.
It works beautifully!!!

Jay Dean

*** Sent via Developersdex http://www.developersdex.com ***
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
concatenating from a different cell within the same row method373 Excel Discussion (Misc queries) 6 February 16th 06 10:24 PM
Concatenating a cell address nebb Excel Worksheet Functions 3 July 16th 05 10:38 PM
Concatenating Cell COmments Jeff Excel Programming 2 January 20th 05 09:34 AM
concatenating cell references nick.pattison Excel Worksheet Functions 2 January 14th 05 07:53 AM
concatenating cell names? ucsdtritons Excel Programming 1 July 7th 04 07:12 AM


All times are GMT +1. The time now is 10:12 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"