Java
Java

Reputation: 1282

How to filter data using multiple criteria (with one line) in Excel

I am trying to filter data by not clicking check marks but just putting row of choices in one line.

For example, instead of clicking individual checkmarks such as C100005136, C100005150, C100005152 and C100005153, I would like to just put these value in one line in somewhere.

For example: C100005136, C100005150, C100005152, C100005153

Possible solution I am looking for is in one line or it could be in multiple rows..

Anyway to copy and paste data of choices is what I am looking for.

enter image description here

Is this possible in Excle2016?

Upvotes: 0

Views: 103

Answers (1)

user4039065
user4039065

Reputation:

Put the values into a cell 'somewhere' then split the cell's value on the delimiter into a variant and use the variant for Criteria1 with operation:=xlfiltervalues.

dim var as variant
var = split(cells(1, "A").value, ", ")
columns("B").autofilter field:=1, criteria1:=var, operation:=xlfiltervalues

Upvotes: 1

Related Questions