Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 151
Default AUTO FILTER WITH VALUE IN CELLS AND COPY FILTERED DATA TO NEW

Hi
Can i use range name instead of absolute range


"Per Jessen" wrote:

On 21 Jun., 21:41, Eddy Stan
wrote:
HI

CODE IN FOR AUTO FILTER & COPY TO NEW FILE

' FOR FIELD 2 "TPT" IS IN RANGE("B2").VALUE
' FOR FIELD 3 "WEST" IS IN RANGE("C2").VALUE
' FOR FIELD 4 "AURANGABAD BRANCH" IS IN RANGE("D2").VALUE

'Selection.AutoFilter Field:=2, Criteria1:="TPT"
'Selection.AutoFilter Field:=3, Criteria1:="WEST"
'Selection.AutoFilter Field:=4, Criteria1:="AURANGABAD BRANCH"
' WANT TO SAVE OUTFILE XLS AS AURANGABAD.XLS

ANY HELP URGENT. PLEASE


Hi

Dim wb As Workbook
Dim wb1 As Workbook

Set wb = ThisWorkbook
Set wb1 = Workbooks.Add
wb.Activate
Range("A1:D10").Copy wb1.Sheets(1).Range("A1") ' Change Range to suit
sPath = "C:\Temp\" ' Change to suit
fName = "AURANGABAD.XLS"
wb1.SaveAs Filename:=sPath & fName

Regards,
Per

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you apply the auto filter to data that are filtered? Skip in FL Excel Worksheet Functions 4 January 7th 09 02:58 AM
using auto filter, how to tell what columns are filtered? Robert Mark Bram Excel Discussion (Misc queries) 5 August 25th 08 01:08 PM
Copy visible cells on Filtered data [email protected] Excel Discussion (Misc queries) 4 July 18th 07 08:18 AM
Copy Auto-filtered data to new sheets JMay Excel Programming 6 July 2nd 07 06:28 PM
Copy auto filtered data edinclimb Excel Discussion (Misc queries) 0 January 3rd 06 06:36 PM


All times are GMT +1. The time now is 01:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"