Formula to extract entire row based on specific criteria

melifreeman

New Member
Joined
Dec 4, 2020
Messages
20
Office Version
  1. 365
Platform
  1. Windows
Hi All,

You were a great help with my last issue so I'm hoping for some more assistance. I have a LARGE project coming up where I will need to track multiple sites and data. I'm hoping to find a way to extract data from one master spreadsheet of information that uses a date range AND a multiple site IDs to fill in the row of data. Below is a mock-up of the master layout. Basically I need it to pull like this:

If the date is between 2/16/21 and 2/18/21 AND the SITE ID includes SDF-03, ABC-01 and ADF-09.....data fills across the row

I can get the data to pull for the Site IDs but the second I try to put in a date range too both my formula (and my brain) goes off track. Any ideas??? Thanks in advance!

DATESITE IDSCHEDULED TIMELAST NAMEFIRST NAMEIDPHOTO REQ.COMPLETENO SHOWOTHER REASON FOR NON-COMPLETION
16-FebSDF-03BUNNYBUGS7790103YESNONO ID
16-FebABC-01STARKTONY8678989NOYES
16-FebABC-02FUDDELMER9567875YESYES
17-FebADF-09BANNERBRUCE10456760YESNOYES
17-FebADF-09BUNNYBUGS11345646YESNONO ID
18-FebABC-01STARKTONY12234532NOYES
16-FebABC-02FUDDELMER13123418YESYES
16-FebABC-011:01 PMSTARKTONY1234567NOYES
18-FebSDF-032:15 PMFUDDELMER3456789YESYES
18-FebADF-091:30 PMBANNERBRUCE2345678YESNOYES
16-FebSDF-029:15 AMBUNNYBUGS4567890YESNONO ID
17-FebABC-01STARKTONY5123446NOYES
17-FebABC-02FUDDELMER6012331YESYES
16-FebABC-01BANNERBRUCE6901217YESNOYES
 
Sorry - one tweak...I need it to leave blank cells as blank cells. It's defaulting to "NO" in the empty cells...
 
Upvote 0

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Blanks cells will not default to NO, but they will contain 0.
 
Upvote 0
How about
Excel Formula:
=if(isblank(FILTER(A2:J18,(A2:A18>=DATEVALUE("16/02/2021"))*(A2:A18<=DATEVALUE("18/02/2021"))*((B2:B18="SDF-03")+(B2:B18="abc-01")+(B2:B18="adf-09")))),"",FILTER(A2:J18,(A2:A18>=DATEVALUE("16/02/2021"))*(A2:A18<=DATEVALUE("18/02/2021"))*((B2:B18="SDF-03")+(B2:B18="abc-01")+(B2:B18="adf-09"))))
 
Upvote 0
Solution
How about
Excel Formula:
=if(isblank(FILTER(A2:J18,(A2:A18>=DATEVALUE("16/02/2021"))*(A2:A18<=DATEVALUE("18/02/2021"))*((B2:B18="SDF-03")+(B2:B18="abc-01")+(B2:B18="adf-09")))),"",FILTER(A2:J18,(A2:A18>=DATEVALUE("16/02/2021"))*(A2:A18<=DATEVALUE("18/02/2021"))*((B2:B18="SDF-03")+(B2:B18="abc-01")+(B2:B18="adf-09"))))
Thank you!!
 
Upvote 0
Another way?
Excel Formula:
=FILTER(IF(ISNUMBER(A2:J18),A2:J18,A2:J18&""),(A2:A18>=DATEVALUE("16/02/2021"))*(A2:A18<=DATEVALUE("18/02/2021"))*((B2:B18="SDF-03")+(B2:B18="abc-01")+(B2:B18="adf-09")))
 
Upvote 0
Well, in my test page the filter formula worked, but when I try to put it into the actual document it is not filtering out the site ID. I can get the dates and data to pull across but the filter is missing the specific site...here is the formula and what I'm getting in return:

=FILTER('[OY3 Selectee Schedules - Completion Log.xlsx]Sheet1'!$A$2:$J$15,('[OY3 Selectee Schedules - Completion Log.xlsx]Sheet1'!$A$2:$A$15=DATEVALUE("3/16/2021")+('[OY3 Selectee Schedules - Completion Log.xlsx]Sheet1'!$A$2:$A$15=DATEVALUE("3/17/2021"))*('[OY3 Selectee Schedules - Completion Log.xlsx]Sheet1'!$B$2:$B$15="MEP-02")))

DATESITE IDSCHEDULED TIMESELECTEE LAST NAMESELECTEE FIRST NAMEHRSPHOTO REQ.COMPLETENO SHOWOTHER REASON FOR NON-COMPLETION
16-MarMEP-011:25 PMBUNNYBUGS7790103YESNO0NO ID
16-MarMEP-0212:00 AMSTARKTONY8678989NOYES0-
16-MarMEP-029:15 AMBUNNYBUGS4567890YESNO0NO ID
16-MarMEP-0412:00 AMFUDDELMER6012331YESYES0-
16-MarMEP-012:15 PMFUDDELMER3456789YESYES0-
16-MarMEP-011:30 PMBANNERBRUCE2345678YESNOYES-
17-MarMEP-0212:00 AMBANNERBRUCE6901217YESNOYES-

What am I doing wrong or missing??
 
Upvote 0
Try
Excel Formula:
=FILTER('[OY3 Selectee Schedules - Completion Log.xlsx]Sheet1'!$A$2:$J$15,(('[OY3 Selectee Schedules - Completion Log.xlsx]Sheet1'!$A$2:$A$15=DATEVALUE("3/16/2021"))+('[OY3 Selectee Schedules - Completion Log.xlsx]Sheet1'!$A$2:$A$15=DATEVALUE("3/17/2021")))*('[OY3 Selectee Schedules - Completion Log.xlsx]Sheet1'!$B$2:$B$15="MEP-02"))
 
Upvote 0
Try
Excel Formula:
=FILTER('[OY3 Selectee Schedules - Completion Log.xlsx]Sheet1'!$A$2:$J$15,(('[OY3 Selectee Schedules - Completion Log.xlsx]Sheet1'!$A$2:$A$15=DATEVALUE("3/16/2021"))+('[OY3 Selectee Schedules - Completion Log.xlsx]Sheet1'!$A$2:$A$15=DATEVALUE("3/17/2021")))*('[OY3 Selectee Schedules - Completion Log.xlsx]Sheet1'!$B$2:$B$15="MEP-02"))
That helped with pulling the specifics for MEP-02, but when I try to add in another site ID it gives me a calc issue. For instance, I need it to pull the dates listed (which it did beautifully) for MEP-01 AND MEP-02, but not the other sites. Or I can get it to pull the site IDs but then it doesn't filter the dates and gives me other dates with the same site IDs.
 
Upvote 0
What did you try to get both sites?
 
Upvote 0

Forum statistics

Threads
1,214,584
Messages
6,120,385
Members
448,956
Latest member
JPav

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