Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem with pasting special merged cells to merged cells

I see several posts on this topic but none recently and I have yet to
find a solution. I am pasting special from a cell that consists to
two merged cells to another cell in the same row that also consists of
two merged cells. The columns are labeled Previous Month's Total and
Current Month's Total so you can see what I'm trying to do.
Interestingly, the problem seems to occur only when I'm doing a paste
special Values. I have to do Values because the cell in the Current
Month's Total contains an equation which I do not want to move to the
cell in the Previous Month's Total column - I just want the value.
Dr. Excel, are you still out there? Anbody else have a clue? I'm
running MS Excel 2003 under XP.
Thank you very much!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Problem with pasting special merged cells to merged cells

ritpg,

using excel 2003:

Sub Toggle()
Dim ma As Object
Dim mb As Object
'B4 & B6 are first cells in respective merge areas
Set ma = Range("B4").MergeArea
Set mb = Range("B6").MergeArea
mb.Cells(1, 1).Value = ma.Cells(1, 1).Value
End Sub

HTH

"ritpg" wrote in message
...
I see several posts on this topic but none recently and I have yet to
find a solution. I am pasting special from a cell that consists to
two merged cells to another cell in the same row that also consists of
two merged cells. The columns are labeled Previous Month's Total and
Current Month's Total so you can see what I'm trying to do.
Interestingly, the problem seems to occur only when I'm doing a paste
special Values. I have to do Values because the cell in the Current
Month's Total contains an equation which I do not want to move to the
cell in the Previous Month's Total column - I just want the value.
Dr. Excel, are you still out there? Anbody else have a clue? I'm
running MS Excel 2003 under XP.
Thank you very much!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem with pasting special merged cells to merged cells

To give you more complete information, I am trying to copy E7:E46 to C7:C46.
And cells C7 & C8 are merged as are C9 & C10, etc. The column E cells are
identically merged. I hope this helps.

"ritpg" wrote:

dThanks for the response. Is what you propose a macro that I need to create?

Can you please provide some additional information? How do I enter it? How
do I execute it? I suspect I will nee to adapt it to my actual spreadsheet.

Again, thanks for your help.

ritpg

"Project Mangler" wrote:

ritpg,

using excel 2003:

Sub Toggle()
Dim ma As Object
Dim mb As Object
'B4 & B6 are first cells in respective merge areas
Set ma = Range("B4").MergeArea
Set mb = Range("B6").MergeArea
mb.Cells(1, 1).Value = ma.Cells(1, 1).Value
End Sub

HTH

"ritpg" wrote in message
...
I see several posts on this topic but none recently and I have yet to
find a solution. I am pasting special from a cell that consists to
two merged cells to another cell in the same row that also consists of
two merged cells. The columns are labeled Previous Month's Total and
Current Month's Total so you can see what I'm trying to do.
Interestingly, the problem seems to occur only when I'm doing a paste
special Values. I have to do Values because the cell in the Current
Month's Total contains an equation which I do not want to move to the
cell in the Previous Month's Total column - I just want the value.
Dr. Excel, are you still out there? Anbody else have a clue? I'm
running MS Excel 2003 under XP.
Thank you very much!



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Problem with pasting special merged cells to merged cells

ritpg,

This is rather clumsy code, but then I'm just a beginner.

BTW I don't seem to be getting all your posts.

Click on Tools/Macro/Visual Basic Editor
You should see comething like VBAProject(yourSpreadsheet.xls)
Highlight that line
From the menu select "Insert" then click on "module"
If you have no other code in that project you should see "Module1" inserted
The cursor should be flashing in a window to the right

Copy the text below the ------- (from Option Explicit to End Sub) and paste
it in that window
Select Tools/Macro/Macros
"procPaste" should be highlighted (if its the only macro in your project)
Click the options button at the bottom right of the form
In the box beside "Ctrl+" enter a letter (e.g. "i")
Click OK, close the form
Save the spreadsheet
Typing Ctrl i will run the macro and should paste E7:E46 to C7:C46 (it does
here)
Good luck & I hope this helps
Note that the macro assumes that Ctrl i is being clicked on the activesheet
containing the merged ranges; it won't work if this is not the case.


-----------------------------------------------------------
Option Explicit
'Copy merged cells

Sub procPaste()
Dim ma As Object
Dim mb As Object
Dim R As Range
Dim rngE As Range
Dim i As Integer

Set rngE = Range("$E$7")
For i = 9 To 45 Step 2
Set rngE = Application.Union(rngE, ActiveSheet.Cells(i, 5))
Next i

For Each R In rngE
Set ma = Range(R.Address).MergeArea
Set mb = Range(R.Address).Offset(0, -2).MergeArea
mb.Cells(1, 1).Value = ma.Cells(1, 1).Value
Next

End Sub




"ritpg" wrote in message
...
To give you more complete information, I am trying to copy E7:E46 to

C7:C46.
And cells C7 & C8 are merged as are C9 & C10, etc. The column E cells are
identically merged. I hope this helps.

"ritpg" wrote:

dThanks for the response. Is what you propose a macro that I need to

create?

Can you please provide some additional information? How do I enter it?

How
do I execute it? I suspect I will nee to adapt it to my actual

spreadsheet.

Again, thanks for your help.

ritpg

"Project Mangler" wrote:

ritpg,

using excel 2003:

Sub Toggle()
Dim ma As Object
Dim mb As Object
'B4 & B6 are first cells in respective merge areas
Set ma = Range("B4").MergeArea
Set mb = Range("B6").MergeArea
mb.Cells(1, 1).Value = ma.Cells(1, 1).Value
End Sub

HTH

"ritpg" wrote in message

...
I see several posts on this topic but none recently and I have yet

to
find a solution. I am pasting special from a cell that consists to
two merged cells to another cell in the same row that also consists

of
two merged cells. The columns are labeled Previous Month's Total

and
Current Month's Total so you can see what I'm trying to do.
Interestingly, the problem seems to occur only when I'm doing a

paste
special Values. I have to do Values because the cell in the Current
Month's Total contains an equation which I do not want to move to

the
cell in the Previous Month's Total column - I just want the value.
Dr. Excel, are you still out there? Anbody else have a clue? I'm
running MS Excel 2003 under XP.
Thank you very much!


.



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
Pasting into merged cells Jacques E. Bouchard Excel Discussion (Misc queries) 1 May 12th 05 03:27 AM
Macro Paste Special Merged Cells KC[_5_] Excel Programming 0 November 2nd 04 02:09 AM
pasting into merged cells with a macro anyanka Excel Programming 2 February 27th 04 10:43 PM


All times are GMT +1. The time now is 10:56 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"