View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
mangesh_yadav[_180_] mangesh_yadav[_180_] is offline
external usenet poster
 
Posts: 1
Default macro to append one cell to another


I doubt that would solve his problem, as he says that the data is no
uniform. Infact something similar was discussed on this forum, excep
instead of append, rows were inserted. check thread
http://excelforum.com/showthread.php?t=276521

Maybe something like

Dim cRows As Long
Dim i As Long

cRows = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 to cRows
if IsEmpty(Cells(i, "A")) then
for k = i to j step -1
cells(j,"B")=cells(j,"B") & " " & cells(i, "B")
next
end if
j = i
Next i

Haven't tested it, but should work

--
mangesh_yada

-----------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047
View this thread: http://www.excelforum.com/showthread.php?threadid=27688