Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default 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/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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/

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
Pasting into merged cells ann Excel Discussion (Misc queries) 2 November 20th 09 06:37 PM
(2003) Pasting into merged cells Therapistmatt Excel Worksheet Functions 3 March 6th 07 06:42 PM
Finding Merged Cells (Part 2) - Free 58k macro Olden Excel Discussion (Misc queries) 0 January 17th 07 11:24 AM
Jim Rech's macro won't work (autofitting merged cells) Ron M. Excel Discussion (Misc queries) 4 March 2nd 06 05:07 PM
Pasting into merged cells Jacques E. Bouchard Excel Discussion (Misc queries) 1 May 12th 05 03:27 AM


All times are GMT +1. The time now is 08:58 PM.

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"