Hello,
I need help creating a VBScript within Power Automate Desktop. I need to filter 2 values (DR and CR) within 1 column. However, within PAD, you can only set 1 variable at a time. Is there a way to filter both the DR and CR values in one column using VBScript?
This is what I have so far, but am stuck on how to add DR to the current filter along with CR.
Set xlApp=Createobject("Excel.Application")
Set xlWbk=xlApp.Workbooks.Open("%FilePath%")
xlApp.Visible=true
Set xlWksht = xlWbk.ActiveSheet
Set xlWksht = xlWbk.Worksheets(5)
xlWksht.Range("D1").AutoFilter %FilterColumn%, "%FilterCR%"
xlWksht.Range("A:S").Copy
Set xlWksht = xlWbk.Worksheets(6)
xlWksht.Range("A1").PasteSpecial
Set xlWksht = xlWbk.Worksheets(5)
xlWksht.Range("D1").AutoFilter %FilterColumn%, "%FilterSLS%"
xlWksht.Range("A:S").Copy
Set xlWksht = xlWbk.Worksheets(8)
xlWksht.Range("A1").PasteSpecial
Set xlWksht = xlWbk.Worksheets(5)
xlWksht.Range("D1").AutoFilter %FilterColumn%, "%FilterPMT%"
xlWksht.Range("A:V").Copy
Set xlWksht = xlWbk.Worksheets(7)
xlWksht.Range("A1").PasteSpecial

Report
All responses (
Answers (