Copy range excluding group data

G

gavmer

Hi all,

I am using the following to copy/paste a data range to a new worksheet
Problem is, the range is a template for info and im using data groupin
to hide certain fields. How can i use the following to copy the rang
but not show or copy the hidden grouped data??

Ideas???

Private Sub CommandButton1_Click()
Dim tmp
tmp = Worksheets("sheet1").Range("appendix").Rows.Count
Worksheets("contract").Activate
Cells.Find(What:="appendix1.0", After:=ActiveCell, LookIn:=xlFormulas
_
LookAt:=xlPart).Offset(2, 0).Select
Selection.Resize(tmp, 1).EntireRow.Insert
Worksheets("sheet1").Range("appendix").Copy
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub

Cheers all!!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top