I have a basic filter setup and it is working properly. I would like to run filter script on every worksheet in workbook that contains “QTR” in the sheet name. Tried a repeat loop but having problems trying to activate the worksheet to apply filter
tell application "Microsoft Excel"
repeat with ws in (get name of (every worksheet in active workbook whose its name contains ("QTR")))
tell range "A1" of active sheet
autofilter range
autofilter range field 6 criteria1 ¬
"<>NTB" with visible drop down
end tell
end repeat
end tell
Thanks