Solved

Insert Copied Rows into existing Grouped Rows - VBA

Posted on 2013-11-25
1
140 Views
Last Modified: 2014-06-30
I just started using Excel 2010 and am running into a problem I did not encounter in 2007.  For my Report, I am grouping a list of rows together.  At the end of the vba automation, I am inserting copied row cells into that group by using "Insert Copied Cells" which are an entire row.  When I do this, however, It breaks the group up into two right at the insertion point.  Is there a way to stop this from happening?  

One solution would be to wait to group the cells after the inserted rows are in place, but this will require a re-write of my vba coding.  Is there an option to turn on or off?  VBA solution is best answer, but open to other suggestions.
InsertCopiedRowIntoGroupedRows.jpg
0
Comment
Question by:pdkolmo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 51

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39674376
Hi,

if you use a partial row like this, you shouldn't have problem to insert it

    myRow = Selection.Row
    myColumn = Selection.Column
    Set myRange = Range(Cells(myRow, myColumn), Range(myRow, Columns.Count).End(xlToLeft))
    

Open in new window

Regards
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question