Thread
:
Need Macro to Copy Visible Cells to New Sheet
View Single Post
#
1
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Need Macro to Copy Visible Cells to New Sheet
try these
Sub copyvis1()
ActiveSheet.Cells.SpecialCells(xlCellTypeVisible). Rows.Copy
Destination:=[sheet5!a6]
End Sub
Sub copyvis()
slr = Range("a65536").End(xlUp).Row
For Each c In Range("a5:a" & slr)
x = Sheets("sheet5").Range("a65536").End(xlUp).Row + 1
If c.EntireRow.Hidden < True Then
c.EntireRow.Copy Destination:= _
Sheets("sheet5").Range("a" & x)
End If
Next
End Sub
--
Don Guillett
SalesAid Software
Granite Shoals, TX
"Progster" wrote in message
...
Hi. I've recently added the use of 'Advanced Filter' to my bag-o-tricks,
and I find that what I would really like to do is to perform the AF "in
place", and then copy the visible cells to a new sheet.
I know it is possible to have the AF output it's results to another
(already existing) sheet, but I find this process cumbersome and
unintuitive.
Could it be that others have felt this way before me, and created a macro
which will grab visibile rows (the results of a filter operation), create
a
new sheet, and place a copy of those rows on the new sheet?
If so, I'd really appreciate it if one or more such solutions might show
up
here!
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]