![]() |
how to filter first column only in range
Hey eb
I need to filter column A only in some sheet. I'm having trouble with setting the Field parameter in autofilter(). This is my code: Set xlApp = CreateObject("Excel.Application") Set xlWb = xlApp.workbooks.Open("D:\myExcel.xls") Set xlWs = xlWb.Worksheets("myWorkSheet") xlWs.Activate xlWs.Range("A1:Z1").AutoFilter 1 =filters all columns in sheet xlWs.Range("A1:Z1").AutoFilter Field:=1 =filter fails will error... Any advice?? TIA Rea |
how to filter first column only in range
Hi Rea,
what about to use advanced filter? |
how to filter first column only in range
what is the criteria? should be in format:
Selection.AutoFilter Field:=1, Criteria1:="<= 100" "Rea" wrote in message ... Hey eb I need to filter column A only in some sheet. I'm having trouble with setting the Field parameter in autofilter(). This is my code: Set xlApp = CreateObject("Excel.Application") Set xlWb = xlApp.workbooks.Open("D:\myExcel.xls") Set xlWs = xlWb.Worksheets("myWorkSheet") xlWs.Activate xlWs.Range("A1:Z1").AutoFilter 1 =filters all columns in sheet xlWs.Range("A1:Z1").AutoFilter Field:=1 =filter fails will error... Any advice?? TIA Rea |
All times are GMT +1. The time now is 10:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com