Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying Autofiltered cells
Hi All,
This I'm sure is easy to do, however I've come to a dead end... My sheet has a bunch of cost data in it with the totals of each column shown in the first 3 rows. I also have a header row on row 4 which is autofiltered. My totals change dependant on what is autofiltered. What I'm trying to do is copy everything that is visible when an autofilter is in place, then paste it on another sheet. Unfortunately ..SpecialCells(xlCellTypeVisible).Copy only selects the autofiltered cells, and header row. I need something that will also copy the totals I have in the first 3 rows. I understand that selection.copy will do what I want, but it grabs the whole sheet, and is time consuming. Thanks for your help. BC |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying Autofiltered cells
http://www.contextures.com/xladvfilter01.html Check this site out maybe you can get it to work -- davesexcel ------------------------------------------------------------------------ davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708 View this thread: http://www.excelforum.com/showthread...hreadid=519058 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying Autofiltered cells
Try this:
Sub BB() Dim rng As Range Set rng = ActiveSheet.AutoFilter.Range rng.Resize(rng.Rows.Count + 3).Copy _ Destination:=Worksheets("Sheet3").Range("A1") End Sub It works for me. -- Regards, Tom Ogilvy "Brad" wrote in message ... Hi All, This I'm sure is easy to do, however I've come to a dead end... My sheet has a bunch of cost data in it with the totals of each column shown in the first 3 rows. I also have a header row on row 4 which is autofiltered. My totals change dependant on what is autofiltered. What I'm trying to do is copy everything that is visible when an autofilter is in place, then paste it on another sheet. Unfortunately .SpecialCells(xlCellTypeVisible).Copy only selects the autofiltered cells, and header row. I need something that will also copy the totals I have in the first 3 rows. I understand that selection.copy will do what I want, but it grabs the whole sheet, and is time consuming. Thanks for your help. BC |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I add up cells that are autofiltered? | Excel Worksheet Functions | |||
autofiltered cells | Excel Programming | |||
Copying to an autofiltered list | Excel Discussion (Misc queries) | |||
Problems copying Autofiltered rows & SpecialCells | Excel Programming | |||
Selecting autofiltered cells | Excel Programming |