Filter multiple options in return

Montanes

New Member
Joined
Aug 18, 2016
Messages
42
Office Version
  1. 365
Platform
  1. Windows
Sheet1 has a list of vehicles that are booked for maintenance as follows:

Week NumberDateVehicleMaintenanceComments
4214/10/2024ABC1InspectionDrop off early
4215/10/2024ABC3ServiceNightshift
4401/11/2024XYZ20MOTAfternoon

Sheet2 needs to draw the relative information from sheet1 for the week as specified in cell E1 (in this case it would be week 42)

DateVehicleMaintenanceComments
14/10/2024ABC1InspectionDrop off early
15/10/2024ABC3ServiceNightshift

Sheet3 is the same as Sheet2 but "E1" would have a month (can format as "October" or "10") instead of a week number and hopefully return the data for that whole month instead of a single week.

I hope this makes sense, i am using someone elses computer so i am unable to upload a sample just now.

Thank-you in advance for you assistance.
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Welcome to the Board!

Since you are using Excel 365, you can use the new FILTER function in order to do this.

So, if this is how the data appears on Sheet1:
1729693329840.png


We can put the following formula in cell A4 on Sheet2 like this to return what you want:
Excel Formula:
=FILTER(Sheet1!B2:E4,Sheet1!A2:A4=Sheet2!E1,"")

1729693385496.png


And for Sheet3, it would be simplest to add Month Start Date in cell E1 and Month End Date in cell F1, and use this formula in cell A4:
Excel Formula:
=FILTER(Sheet1!B2:E4,(Sheet1!B2:B4>=Sheet3!E1)*(Sheet1!B2:B4<=Sheet3!F1),"")

1729693487643.png
 
Upvote 0
Solution
Thanks very much for this, the solution for Sheet2 has worked a treat, however Sheet3 is missing a bit.

Unlike sheet2, sheet3 has only auto-populated the solution in column A so there is no return value in columns B, C or D.
 
Upvote 0
Thanks very much for this, the solution for Sheet2 has worked a treat, however Sheet3 is missing a bit.

Unlike sheet2, sheet3 has only auto-populated the solution in column A so there is no return value in columns B, C or D.
Sounds like you mis-typed the formula.
Check it again, and if it is still not working, please the exact formula you are using.
 
Upvote 0
You are welcome.
Glad I was able to help!
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top