Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Merging cells


I have a spreadsheet where I would like to merge the cells in each row
into one cell, excluding the first three columns.
So columns A to C I don’t want to merge.
However, I would like to merge C1 to M1 into one cell in row one and so
on, for example.
The problem is that in each row the number of cells that have data in
them to be merged will vary.
So I’m asking for a formula that is capable to search each row and
merge all data, after column C.
For each merged cell I would like to have some sort of separator, say a
comma, to distinguish the merged cells.
I hope that this hasn’t been asked before, or that this hasn’t been too
confusing.
Thanks for any help


--
sonic
------------------------------------------------------------------------
sonic's Profile: http://www.excelforum.com/member.php...o&userid=23060
View this thread: http://www.excelforum.com/showthread...hreadid=387698

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Merging cells


if you are open to the idea of a macro advise


--
duane


------------------------------------------------------------------------
duane's Profile: http://www.excelforum.com/member.php...o&userid=11624
View this thread: http://www.excelforum.com/showthread...hreadid=387698

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Merging cells


please, if you can,
thank you


--
sonic
------------------------------------------------------------------------
sonic's Profile: http://www.excelforum.com/member.php...o&userid=23060
View this thread: http://www.excelforum.com/showthread...hreadid=387698

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Merging cells


this concatenates column d and on for each row (with a " , " between
pieces) and then inserts result in column d

i guess you could insert column d first, concatenate columns e and o,
and eliminate the 2nd loop.

Sub concat()
'istring(i) are the concatenated strings
' assume raw data starts in row 1 and is 1000 rows max
Dim istring(1000) As String
erow = Cells(1, 1).End(xlDown).Row
For i = 1 To erow
istring(i) = ""
icol = Cells(i, 1).End(xlToRight).Column
For j = 4 To icol
If j = 4 Then istring(i) = Cells(i, j).Value Else _
istring(i) = istring(i) & " , " & Cells(i, j).Value
Next j
Next i
Cells(1, 4).EntireColumn.Insert
For i = 1 To erow
Cells(i, 4) = istring(i)
Next i
Columns("d:d").Columns.AutoFit
End Sub


--
duane


------------------------------------------------------------------------
duane's Profile: http://www.excelforum.com/member.php...o&userid=11624
View this thread: http://www.excelforum.com/showthread...hreadid=387698

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Merging cells


Thank you very much!!!
That was stunning
It did just what I neede

--
soni
-----------------------------------------------------------------------
sonic's Profile: http://www.excelforum.com/member.php...fo&userid=2306
View this thread: http://www.excelforum.com/showthread.php?threadid=38769



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
merging cells and eliminating spaces for empty cells Jill Excel Discussion (Misc queries) 2 April 2nd 10 07:43 PM
Formula for merging cells/re sizing cells Mathicas Excel Discussion (Misc queries) 1 September 29th 08 08:16 PM
merging cells together but keeping all data from the cells Pete C[_2_] Excel Discussion (Misc queries) 3 May 16th 08 10:14 PM
Merging Cells David New Users to Excel 24 September 2nd 06 08:36 PM
Merging Cells DC Excel Discussion (Misc queries) 4 February 21st 06 06:42 PM


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