copying and pasting only non-hidden rows

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

Would anybody know how to copy an entire worksheet and
paste values only to a new worksheet and include only
visible rows (do not include hidden rows)

Thanks,

Jason
 
Jason, you can do it with a macro, here is one way

Sub Macro1()
ActiveSheet.UsedRange.SpecialCells(xlCellTypeVisible).Copy
Sheets("Sheet2").Select
Range("A1").Select
ActiveSheet.Paste
End Sub
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **
 
Jason

Hit CRTL + A to select all cells.

Edit>Go To>Special>Visible cells only>OK

Copy and paste to new sheet.

Gord Dibben Excel MVP
 
Great.........thanks Paul
-----Original Message-----
Jason, you can do it with a macro, here is one way

Sub Macro1()
ActiveSheet.UsedRange.SpecialCells (xlCellTypeVisible).Copy
Sheets("Sheet2").Select
Range("A1").Select
ActiveSheet.Paste
End Sub
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **





.
 
Folks:

Great, Paul: but my vote goes to Gord for simplicity and succinctness
Just 2 of the Virtues.

Al
 
That's me. Simpleton Gord<g>

I have the "Go To" button on my toolbar. Saves a mouse-click.

Gord
 
I use F5, but why isn't the "select visible cells" icon on your toolbar.

You ain't sooooo simple!

Tools|customize|Commands Tab|near the bottom of the Edit category.

(By the time I find the icon, I can do F5, special, visible cells only!)
 
Dave

There are other options available under the Go To>Special dialog, not just
"visible cells only", that may be used from time to time. The "Go To" covers
all.

I don't need any more buttons on my toolbar thanks.

Gord
 
Back
Top