Need to apply multiple filter on an excel column via VBScript -


i need apply multiple filter excel column using vbscript (vbs file, not vba).

my sheet this:

order    line status  ord1     awaiting return ord2     entered ord3     shipped ord4     fulfilled ord5     awaiting return ord6     shipped 

i need apply filter on line status column need show columns

'awaiting return','entered','shipped'.

i wrote following code:

set objsrcexcel = createobject("excel.application") objsrcexcel.visible = false obj objsrcexcel.displayalerts = false    set objsrcworkbook = objsrcexcel.workbooks.open(srcfile) set objsrcworksheet = objsrcworkbook.worksheets(srcsheet)  objxlappws .range("k1" ).autofilter 11,"=awaiting return",2 , "=entered",2 , "=awaiting shipping"  end 

but results error.

i able apply filter using above code, 2 filter options i.e. 'awaiting return' , 'entered' when try go 3 values, erred.

//this code works 2 filter values      objxlappws      .range("k1" ).autofilter 11,"=awaiting return",2 , "=entered"       end 

any appreciated.

prachi

there 2 criterias direct combination. see https://msdn.microsoft.com/en-us/library/office/ff193884.aspx.

you have use array criteria1 , operator xlfiltervalues= 7.

... .range("k1").autofilter 11, array("awaiting return", "entered", "awaiting shipping"), 7 ... 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -