Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 788
Default Permanently merge cells with text data w/o a formula?

Is it possible to combine the text entrys of multiple cells (in the same
column) without the use of a formula?

For example, I have data in C5, C6, and C7, I would highlight those cells
and...?

Thanks in advance,

-Chris
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Permanently merge cells with text data w/o a formula?

Not without a formula or a VBA macro.


Gord Dibben MS Excel MVP

On Tue, 9 Oct 2007 11:19:00 -0700, Chris
wrote:

Is it possible to combine the text entrys of multiple cells (in the same
column) without the use of a formula?

For example, I have data in C5, C6, and C7, I would highlight those cells
and...?

Thanks in advance,

-Chris


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 788
Default Permanently merge cells with text data w/o a formula?

Gord,

Any thoughts on a macro I could create to make this happen?

Thanks,

-Chris

"Gord Dibben" wrote:

Not without a formula or a VBA macro.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Permanently merge cells with text data w/o a formula?

Couple of ways to go.

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

=ConCatRange(C5:C7) which gives you space-delimited list of a contiguous range.

Or a macro which allows a de-limiter and non-contiguous cells to be chosen.

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) - 1)
Exit Sub
endit:
MsgBox "Nothing Selected. Please try again."
End Sub


Gord

On Tue, 9 Oct 2007 12:11:02 -0700, Chris
wrote:

Gord,

Any thoughts on a macro I could create to make this happen?

Thanks,

-Chris

"Gord Dibben" wrote:

Not without a formula or a VBA macro.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 788
Default Permanently merge cells with text data w/o a formula?

Cheers.

Thanks,

-Chris

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
I cannot see all of my text when I merge cells. cmatto Excel Discussion (Misc queries) 1 June 29th 07 06:05 PM
merge several cells with text into 1 cell chum Excel Discussion (Misc queries) 4 July 25th 06 04:30 PM
VBA for Text/Cells merge Ron Excel Discussion (Misc queries) 6 May 21st 06 05:33 PM
How do I merge new text into existing text cells. bweiner Excel Discussion (Misc queries) 2 December 12th 05 12:36 AM
merge multiple row cells of text corresponding to one row of data roberta t williams Excel Worksheet Functions 0 August 12th 05 04:09 PM


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