pasting into merged cells with a macro
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 -- Message posted from http://www.ExcelForum.com |
pasting into merged cells with a macro
anyanka
One way: Sub CopyToMergedCells() For i = 1 To 3 Cells(i, 3) = Cells(i, 1) Next End Sub Regards Trevor "anyanka " wrote in message ... 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, 3 cells (A1:A3) in to 3 merged cells (C1:C3) through a macro, it keeps saying "cannot paste in merged cells". what can I do about that? The merged cells have to stay like they are and I have to get the data in there! Thanx --- Message posted from http://www.ExcelForum.com/ |
pasting into merged cells with a macro
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? --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 12:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com