i have excel data in datatable now i want to filter rows with starting 2ya ,8tb and QML
here the challenge is now i have 3 rows to filter .but i want dynamically to filter rows so that if tommorow if the rows are increased i can filter
Actually iam using for each row and do iam using filter datatable activity but here when i pass the current row it is filtering the 1 row but in the next iteration earlier filter is unfiltered
and new filter is applied
i want all the filters to be applied at same time how can do this
please use this macro…save as text file and use invoke vba…pass the required values as comma separated string…it will filter will all together…Assuming you want to filter column A …if not change it accordingly in range
Sub Macro1(str As String)
Set ws = ActiveSheet
If ws.AutoFilterMode Then
ws.AutoFilterMode = False
End If
filtervalues = Split(str, ",")
ws.Range("A1").AutoFilter Field:=1, Criteria1:=filtervalues, Operator:=xlFilterValues
End Sub
can u please clarify one thing i have 2 excel workbooks in one workbook iam getting the values and stored in DT_black datable and those values are 2YA, 2XL,8TB now i want to apply a multifilter on the DT_Filtered which is another datatable here in DT_Filtered data i want to apply filter all the values which i got from the DT_Black
how macro will help here …
You are conflicting your own statements…I asked you if you want to filter on excel or datatable and you told on dattaable…the above example is to filter on excel using data from a datatable as you explained
If you want to do on datatable then use for loop on first rable…filter datatable and stored it in filtered table and then use merge datatable to add the filtered datatable to a finaldt…this way at the end of loop you will have all filtered data in finaldt