pasting into merged cells with a macro

  • Thread starter Thread starter anyanka
  • Start date Start date
A

anyanka

Hi, i'm totally new at this, but i really want to learn!

My problem at the moment is, when i try to paste data from, let say,
cells (A1:A3) in to 3 merged cells (C1:C3) through a macro, it keep
saying "cannot paste in merged cells".

what can I do about that? The merged cells have to stay like they ar
and I have to get the data in there!

Than
 
anyanka

One way:

Sub CopyToMergedCells()
For i = 1 To 3
Cells(i, 3) = Cells(i, 1)
Next
End Sub

Regards

Trevor
 
Hi,
thanx for that, but i just don't seem to be able to fit in my own sub:

Sub Copy()
If ActiveCell = "0:1" And ActiveCell.Offset(0, -3) = "2,1" Then
Sheets("sheet1").Range("E21:G21").Copy
Destination:=ActiveCell.Offset(0, 1)
End If
End Sub

Do you know how i can fit in there?
 
Back
Top