Hi,
You have to use AdvancedFilter with a criteria range if there are more than two criteria.
https://learn.microsoft.com/en-us/office/vba/api/excel.range.advancedfilter
https://support.microsoft.com/en-us/office/filter-by-using-advanced-criteria-4c9222fe-8529-4cd7-a898-3f16abdff32b
$criteria = $ws1.Range("L1","M3")
$ws1.UsedRange.AdvancedFilter(1,$criteria)
Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.