Duplicating information.....hellllllp!!!
Posted by Dan on February 27, 2001 6:55 AM
Can you help me with some code that tries to duplicate data spread over various lines in column B to one line in Column C!!!
Sub MergeCells()
Dim startCell As Range, destCell As Range
Dim rng As Range, sourceCell As Range
Set startCell = Range("B2")
Set destCell = Range("C2")
Set rng = Range(startCell, startCell.End(xlDown))
Do
For Each sourceCell In rng
destCell.Value = destCell & " " & sourceCell
Next
Set startCell = startCell.End(xlDown).End(xlDown)
Set rng = Range(startCell, startCell.End(xlDown))
Set destCell = startCell.Offset(0, 1)
Loop While destCell.Row <> 65536
End Sub
It worked really well until row 758. Then I got a message saying "Run-time error 13: Type mismatch". It seems to be having problems with the line :
I'd appreciate any help!!
Dan