Is it possible to copy autofiltered data from one worksheet to another and have the filters copy with the data? (I hope this makes sense). I know I could use an Advanced filter to copy the filtered data to another worksheet, but I want the filter criteria too.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Copy/Paste Autofiltered Data (97)
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Copy/Paste Autofiltered Data (97)
- This topic has 6 replies, 5 voices, and was last updated 23 years, 2 months ago.
AuthorTopicWScshepard
AskWoody LoungerApril 8, 2002 at 10:06 pm #369333Viewing 0 reply threadsAuthorReplies-
WSHansV
AskWoody LoungerApril 9, 2002 at 7:59 am #581303According to Microsoft (q214306), you can’t copy/paste AutoFiltered data. (The KnowledgeBase item is for Excel 2000, but I suppose it is also valid for Excel 97.)
Perhaps somebody can come up with a solution in VBA; I don’t know how to get at the AutoFilter criteria.
When you copy the entire worksheet containing AutoFiltered data (instead of copying a range of cells), the AutoFilter is copied to the new sheet complete with the imposed criteria.
-
WSCecil
AskWoody LoungerApril 9, 2002 at 11:43 am #581314I copy and paste autofiltered data all the time. However, only the data which passes the filter test is copied. I am unaware how to copy the filter itself though, asside from copying a whole sheet.
Also, a single level of summarized data may be copied. I have added the “Select Visible Cells” icon to my toolbar for this purpose.
-
WSrgovett
AskWoody LoungerApril 11, 2002 at 2:16 am #581527Edited by WebGenii on 10-Apr-02 23:16.
There is a way to print the aotofilter values, see http://j-walk.com/ss/excel/usertips/tip044.htm%5B/url%5D
-
-
zeddy
AskWoody_MVPApril 10, 2002 at 1:29 pm #581584To get at the AutoFilter criteria, turn on the macro recorder and then change some of the AutoFilter criteria.
Stop recording and then look at the code generated.
To simplify tasks, you could assign range names to the relevant cells.
You should then be able to set and retrieve the criteria through VBAzeddy
-
WSHansV
AskWoody LoungerApril 10, 2002 at 2:27 pm #581599Thanks, zeddy!
I don’t know if the original poster is still interested. Here is a crude macro that still needs a lot of work for a real-life application (especially error-handling). It asks for a source cell and destination cell. The source cell should be somewhere within the AutoFiltered table; the destination cell should be in another worksheet.
Sub CopyWithAutoFilter()
Dim rngSrc As Range, rngDst As Range
Dim af As AutoFilter, f As Filters, i As Integer
Dim FilterInfo()
Set rngSrc = Range(InputBox(“Source”))
Set rngSrc = rngSrc.CurrentRegion
Set rngDst = Range(InputBox(“Destination”))
Set af = rngSrc.Parent.AutoFilter
Set f = af.Filters
ReDim FilterInfo(1 To f.Count, 1 To 5)
For i = 1 To f.Count
If f(i).On Then
FilterInfo(i, 1) = f(i).Criteria1
FilterInfo(i, 3) = f(i).Operator
If f(i).Operator 0 Then
FilterInfo(i, 2) = f(i).Criteria2
End If
End If
FilterInfo(i, 4) = f(i).On
Next i
rngSrc.Copy rngDst
Set rngDst = rngDst.CurrentRegion
For i = 1 To f.Count
If f(i).On Then
If f(i).Operator 0 Then
rngDst.AutoFilter i, f(i).Criteria1, f(i).Operator, f(i).Criteria2
Else
rngDst.AutoFilter i, f(i).Criteria1
End If
End If
Next i
End Sub -
zeddy
AskWoody_MVP
-
-
-
Viewing 0 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Search Forums only bring up my posts?
by
Deo
17 minutes ago -
Windows Spotlight broken on Enterprise and Pro for Workstations?
by
steeviebops
8 hours, 6 minutes ago -
Denmark wants to dump Microsoft for Linux + LibreOffice
by
Alex5723
43 minutes ago -
How to get Microsoft Defender to honor Group Policy Setting
by
Ralph
8 hours, 42 minutes ago -
Apple : Paragon’s iOS Mercenary Spyware Finds Journalists Target
by
Alex5723
18 hours, 51 minutes ago -
Music : The Rose Room – It’s Been A Long, Long Time album
by
Alex5723
19 hours, 57 minutes ago -
Disengage Bitlocker
by
CWBillow
9 hours, 55 minutes ago -
Mac Mini M2 Service Program for No Power Issue
by
Alex5723
21 hours, 57 minutes ago -
New Win 11 Pro Geekom Setup questions
by
Deo
1 hour, 43 minutes ago -
Windows 11 Insider Preview build 26200.5651 released to DEV
by
joep517
1 day, 5 hours ago -
Windows 11 Insider Preview build 26120.4441 (24H2) released to BETA
by
joep517
1 day, 5 hours ago -
iOS 26,, MacOS 26 : Create your own AI chatbot
by
Alex5723
1 day, 9 hours ago -
New PC transfer program recommendations?
by
DaveBoston
4 hours, 31 minutes ago -
Windows 11 Insider Preview Build 22631.5545 (23H2) released to Release Preview
by
joep517
1 day, 13 hours ago -
Windows 10 Build 19045.6029 (22H2) to Release Preview Channel
by
joep517
1 day, 13 hours ago -
Best tools for upgrading a Windows 10 to an 11
by
Susan Bradley
1 day, 1 hour ago -
The end of Windows 10 is approaching, consider Linux and LibreOffice
by
Alex5723
5 hours, 36 minutes ago -
Extended Windows Built-in Disk Cleanup Utility
by
bbearren
14 hours, 30 minutes ago -
Win 11 24H2 June 2025 Update breaks WIFI
by
dportenlanger
2 days, 8 hours ago -
Update from WinPro 10 v. 1511 on T460p?
by
CatoRenasci
1 day, 6 hours ago -
System Restore and Updates Paused
by
veteran
2 days, 10 hours ago -
Windows 10/11 clock app
by
Kathy Stevens
1 day, 21 hours ago -
Turn off right-click draw
by
Charles Billow
2 days, 13 hours ago -
Introducing ChromeOS M137 to The Stable Channel
by
Alex5723
2 days, 17 hours ago -
Brian Wilson (The Beach Boys) R.I.P
by
Alex5723
9 minutes ago -
Master patch listing for June 10, 2025
by
Susan Bradley
2 days, 19 hours ago -
Suggestions for New All in One Printer and a Photo Printer Windows 10
by
Win7and10
1 hour, 48 minutes ago -
Purchasing New Printer. Uninstall old Printer Software First?
by
Win7and10
3 days, 1 hour ago -
KB5060842 Issue (Minor)
by
AC641
1 day, 13 hours ago -
EchoLeak : Zero Click M365 Copilot leak sensitive information
by
Alex5723
3 days, 8 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.