If you mean that you want to read one sheet, filter the results, and then write out another sheet, I'd suggest you:
Read all the data from the sheet into memory (assuming its not excessively large).
Use LINQ or vanilla C# to filter the data, (I'd recommend LINQ's ".Where()" and ".Distinct()" operators myself).
Use the Excel API to write the data that remains into a new sheet.
If the spreadsheet(s) are very large, then you'll probably be best served by reading them into a database of some sort, and then relying on it for the filtration. You can use MS Access or SQLite as a small dedicated DB if you need.