Advanced (?) Excel sorting

Posted by Preston Grayskull on Super User See other posts from Super User or by Preston Grayskull
Published on 2013-11-07T18:14:22Z Indexed on 2013/11/07 22:01 UTC
Read the original article Hit count: 262

First of all, I'd like to admit that I don't really know anything about Excel, but I have tried to look up a solution to this in Excel books and Googling.

Here's what I'm trying to do:

I have a really long spreadsheet There are 7 columns total, but only two columns that I'm most interested in. Here's an example CSV that is much more simple than my actual dataset, but the search/sort is analogous:

John, Apple
Dave, Apple
Dave, Orange
Steve, Apple
Steve, Orange
Steve, Kiwi
Bob, Apple
Bob, Banana

I'm interested in extracting the entire rows (all of the columns) that meet the following criteria:

["Apple"] OR ["Apple" and "Orange"] NOT ["Apple" and "Orange" and Anything Else] NOT ["Apple" and Anything that isn't Orange]

So with the above CSV, I would get the entire rows for John and Dave, but not Steve and not Bob.

I started doing this manually, and will likely finish by the time this question has an answer, but I would like to know this for future reference.

Thanks!

© Super User or respective owner

Related posts about microsoft-excel

Related posts about microsoft-excel-2010