?
Solved

Insert Copied Rows into existing Grouped Rows - VBA

Posted on 2013-11-25
1
Medium Priority
?
143 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 52

Accepted Solution

by:
Rgonzo1971 earned 2000 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

Industry Leaders: 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

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

764 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