简体   繁体   中英

Extract Data from a Table in Excel Based On A Criteria

I have a list of data in 'Table1' on an Excel spreadsheet that looks like this:

Column A       Column B
Pizza Sauce    3
Pepperoni      0
Cheese         1
Crust          2
Garlic         0
Sausage        0

From this list I want to be able to create a second list that, based on the value in B, shows the value in A. I want anything that is greater than 0 to show in this list (For an order sheet to give to a vendor). Like such:

Column A       Column B
Pizza Sauce    3
Cheese         1
Crust          2

How might I go about doing this? I've looked around but haven't been able to do so successfully.

Why don't you use pivot table and filter out 0 value in column B. So every time you want an updated table, you just have to refresh the pivot table and your table is ready.

You can find pivot option in Insert -> PivotTable and provide the source data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM