当前位置: 动力学知识库 > 问答 > 编程问答 >

Excel More Than 2 Contains Filter?

问题描述:

I'm having a bit of a filtering problem. For simplicity let's say this is my data set.

 Employee Building

Bob 1, 3

Tim 2, 4

John 2, 3

Matt 2, 6

I Want to create a filter so I can find all employees that work in either building, 1, 3 or 6. So in this case it would filter Tim out. If it was just two criteria I could create a filter and go to contains, and type 1 then OR 2. Basically I'm limited by the fact that there are just 2 fields there. Can I expand this? Some suggestions I've read were to use Advanced Filter but all the examples I saw, it wouldn't work since each column contained a single data point.

Edit: Data didn't come out the way I had intended but I have two columns. One for employee Name. One for Building. The building column has multiple data points in one cell, as one employee could work in more than building.

网友答案:

You need a "helper column".

With data in columns A & B, in C2 enter:

=ISNUMBER(FIND("1",B2))+ISNUMBER(FIND("3",B2))+ISNUMBER(FIND("6",B2))

and copy down:

Then apply the AutoFilter to hide the rows that contain 0 in column C.

分享给朋友:
您可能感兴趣的文章:
随机阅读: