ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Saving a filter? (https://www.excelbanter.com/excel-discussion-misc-queries/26001-saving-filter.html)

rik84

Saving a filter?
 
I am sorting a large spreadsheet. I have filtered down to my chosen rows, now
I want to save this as a separate sheet!

Max

Press CTRL + A
Right-click Copy

Click on a new sheet
Right-click on A1 Paste

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"rik84" wrote in message
...
I am sorting a large spreadsheet. I have filtered down to my chosen rows,

now
I want to save this as a separate sheet!




Jim May

Or use (in a standard module) - **chg "Sheet2" name below, if necessary**:
Code By Tom Ogilvy (If I remember right)

Sub CopyFilter()
Dim rng As Range
Dim rng2 As Range
With ActiveSheet.AutoFilter.Range
On Error Resume Next
Set rng2 = .Offset(1, 0).Resize(.Rows.Count - 1, 1) _
.SpecialCells(xlCellTypeVisible)
On Error GoTo 0
End With
If rng2 Is Nothing Then
MsgBox "No Data to copy"
Else
Worksheets("Sheet2").Cells.Clear
Set rng = ActiveSheet.AutoFilter.Range
rng.Copy Destination:=Worksheets("Sheet2").Range("A1")
End If
ActiveSheet.ShowAllData
End Sub

Hope this helps

"Max" wrote in message
...
Press CTRL + A
Right-click Copy

Click on a new sheet
Right-click on A1 Paste

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"rik84" wrote in message
...
I am sorting a large spreadsheet. I have filtered down to my chosen

rows,
now
I want to save this as a separate sheet!







All times are GMT +1. The time now is 08:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com