Written by Allen Wyatt (last updated September 5, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021
Steve has a worksheet containing a list of music artists, albums, and the year of album release. (These are for his music collection.) Steve goes to a lot of music festivals, and he is trying to work out how to return, from a full music list, a list of albums by the artists that he is going to see at the festival. He has tried various array formulas, but to no avail.
For the purposes of this tip, I'm going to assume that your data is quite simple: Column A contains the artist, column B the album name, and column C the year that the album was released. Given this data, there are a few different approaches you can use.
First, you can select a cell in the data, display the Data tab of the ribbon, and then click the Filter tool. Excel displays drop-down arrows next to columns A, B, and C. Click the down-arrow for column A (the artist) and then, from the options presented, make sure that only the artists you want are selected. Those, then, are displayed and you can print your list for the festival.
Another approach is to use the FILTER function. (This will work if you are using Excel 2021 or Microsoft 365.) If you, for instance, want to search your list for any artists named "Enya" or "Eagles" (I'm obviously showing my age), then you could use the following formula to display just the desired artists and their albums:
=FILTER(A:B,(A:A="Enya")+(A:A="Eagles"))
This works great if your original list is already sorted, but you could also encase the entire formula in the SORT function:
=SORT(FILTER(A:B,(A:A="Enya")+(A:A="Eagles")))
A third approach is to create a very simple PivotTable based on your music collection. You can easily add the artist column to the Rows of the PivotTable, which will then show you all your artists in alphabetic order. If you then want to see the albums of a particular artist, double-click on the artist name and then choose Album from the resulting Show Detail dialog box.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13910) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
The filtering tools provided in Excel make it easy to filter a data list so that only certain rows are displayed. What if ...
Discover MoreFiltering can be a powerful way to work with large amounts of data in a worksheet. If you use filtering quite a bit, you ...
Discover MoreWhen you are working with large amounts of data in a worksheet, filtering that data can make the process much simpler. ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2023-09-05 02:23:43
Enno
In my Office 2019 there isn't any FILTER-Function.
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments