2

I have row of six digit numbers where I want to filter rows containing exact numbers set. For example:

orderid
154934
154935
154936
154937
154938
154939
154940

I want to filter 154935,154937 these numbers exactly. But am not sure how to do that on filter option.

This is just an example. I actually want to do the same from large column.

3
  • Perhaps this answer is of use: webapps.stackexchange.com/a/42433/29140 Nov 5, 2015 at 21:25
  • Filter View and checking those numbers as options would work as well. Nov 6, 2015 at 2:32
  • order status changes everyday like packed, shipped, delivered, etc., for different orders. if I have to update it in the sheet, I need to filter those exact id but as of now am clicking one by one
    – Ted
    Nov 6, 2015 at 14:30

1 Answer 1

0

I actually want to do the same from large row

I understand you have a large row of numbers that you would like to filter by. Perhaps your data is in columns A and B, and the cells C1:E1 are occupied by numbers like 154936, 154935, 154940.

Then you can put the following command somewhere:

=query(A:B, "select * where A matches '" & join("|", C1:E1) & "'")

This does the following:

  1. Joins the row of numbers to filter by, using | as a separator.
  2. Uses this string 154936|154935|154940 as a regular expression in the where ... matches selector.
  3. Selects all columns (within the specified range, A:B) from the rows that matched.
1
  • Hi, thanks for the reply. I am sorry I confused the question with the word row (I edited it now) but all the data is in one column only. I have all orders in one column and the next day status changes like some orders get shipped, some delivered, some returned. I want to update this status by filter.
    – Ted
    Nov 11, 2015 at 6:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.