Forum Discussion
How to make all the items that occur on a particular date appear in another worksheet
- May 25, 2023
Here is how you can do it, using the FILTER function:
- In Sheet 2, enter the desired date in cell B1.
- In cell A3, enter the following formula to retrieve the filtered sales data from Sheet 1:
=FILTER(Sheet1!$A$2:$D$12, Sheet1!$A$2:$A$12 = B1)
Replace Sheet1!$A$2:$D$12 with the actual range of your sales data in Sheet 1.
3. Press Enter to get the filtered sales data. The formula will display the sales records from Sheet 1 that match the date entered in cell B1.
4. Adjust the range references in the formula as needed to match your actual data range in Sheet 1.
Now, whenever you change the date in cell B1, the sales data in Sheet 2 will automatically update based on the new date. Note that this method requires the data in Sheet 1 to be sorted by date in ascending order for accurate results.
Another approach is to use the Power Query feature
To populate all the sales data that occurred on a particular date in another worksheet in Excel 365, you can use the Power Query feature. Here's how you can do it:
- Select the range of your sales data in Sheet 1 (including the headers).
- Go to the "Data" tab in the Excel ribbon and click on "From Table/Range" in the "Get & Transform Data" section. This will open the Power Query Editor.
- In the Power Query Editor, ensure that the column headers are correct. If needed, you can rename them by selecting the column header and clicking on "Transform" -> "Rename".
- Close the Power Query Editor by clicking on the "Close & Load" button in the "Home" tab. This will load the data into a new table.
- Go to Sheet 2 and select the cell where you want the date input to be entered (in this example, B1).
- In the Excel ribbon, go to the "Data" tab and click on "Get Data" -> "From Table/Range" in the "Get & Transform Data" section. This will open the Power Query Editor again.
- In the Power Query Editor, click on the date cell (B1) in the first row to select it.
- Right-click on the selected cell and choose "Drill Down". This will extract the selected date value.
- Close the Power Query Editor by clicking on the "Close & Load" button in the "Home" tab. This will load the extracted date value into a new table.
- Select the cell where you want the filtered data to start (in this example, A3).
- In the Excel ribbon, go to the "Data" tab and click on "From Table/Range" in the "Get & Transform Data" section. This will open the Power Query Editor again.
- In the Power Query Editor, click on the "Date" column header to select it.
- Go to the "Home" tab in the Power Query Editor and click on the "Filter Rows" button in the "Transform" section. This will open the filter options.
- In the filter options, choose the desired date from the list or enter the desired date manually.
- Close the Power Query Editor by clicking on the "Close & Load" button in the "Home" tab. This will load the filtered data into the selected cell.
Now, the Sheet 2 table will display only the sales data that occurred on the selected date. Whenever you change the date in cell B1, you can right-click on the table in Sheet 2 and choose "Refresh" to update the data based on the new date. These steps were created with the help of AI.
Here is how you can do it, using the FILTER function:
- In Sheet 2, enter the desired date in cell B1.
- In cell A3, enter the following formula to retrieve the filtered sales data from Sheet 1:
=FILTER(Sheet1!$A$2:$D$12, Sheet1!$A$2:$A$12 = B1)
Replace Sheet1!$A$2:$D$12 with the actual range of your sales data in Sheet 1.
3. Press Enter to get the filtered sales data. The formula will display the sales records from Sheet 1 that match the date entered in cell B1.
4. Adjust the range references in the formula as needed to match your actual data range in Sheet 1.
Now, whenever you change the date in cell B1, the sales data in Sheet 2 will automatically update based on the new date. Note that this method requires the data in Sheet 1 to be sorted by date in ascending order for accurate results.
Another approach is to use the Power Query feature
To populate all the sales data that occurred on a particular date in another worksheet in Excel 365, you can use the Power Query feature. Here's how you can do it:
- Select the range of your sales data in Sheet 1 (including the headers).
- Go to the "Data" tab in the Excel ribbon and click on "From Table/Range" in the "Get & Transform Data" section. This will open the Power Query Editor.
- In the Power Query Editor, ensure that the column headers are correct. If needed, you can rename them by selecting the column header and clicking on "Transform" -> "Rename".
- Close the Power Query Editor by clicking on the "Close & Load" button in the "Home" tab. This will load the data into a new table.
- Go to Sheet 2 and select the cell where you want the date input to be entered (in this example, B1).
- In the Excel ribbon, go to the "Data" tab and click on "Get Data" -> "From Table/Range" in the "Get & Transform Data" section. This will open the Power Query Editor again.
- In the Power Query Editor, click on the date cell (B1) in the first row to select it.
- Right-click on the selected cell and choose "Drill Down". This will extract the selected date value.
- Close the Power Query Editor by clicking on the "Close & Load" button in the "Home" tab. This will load the extracted date value into a new table.
- Select the cell where you want the filtered data to start (in this example, A3).
- In the Excel ribbon, go to the "Data" tab and click on "From Table/Range" in the "Get & Transform Data" section. This will open the Power Query Editor again.
- In the Power Query Editor, click on the "Date" column header to select it.
- Go to the "Home" tab in the Power Query Editor and click on the "Filter Rows" button in the "Transform" section. This will open the filter options.
- In the filter options, choose the desired date from the list or enter the desired date manually.
- Close the Power Query Editor by clicking on the "Close & Load" button in the "Home" tab. This will load the filtered data into the selected cell.
Now, the Sheet 2 table will display only the sales data that occurred on the selected date. Whenever you change the date in cell B1, you can right-click on the table in Sheet 2 and choose "Refresh" to update the data based on the new date. These steps were created with the help of AI.
- ChineduEMay 26, 2023Copper Contributor
Thank you. NikolinoDE
The filter function was not available on my excel since it's the 2019 version. I managed to get it to work online.
- Viiktor-180Aug 14, 2023Copper Contributor
ChineduE any idea on how to do this on a Macbook or alternatives? I’ve been struggling
- ChineduEAug 28, 2023Copper Contributor
Viiktor-180 Hi!
I used google docs and the FILTER function worked. If you have access to an online version of excel or google docs it should work just fine.