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
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
How about
+Fluff v2.xlsm
ABCDEFGHIJ
1DATESITE IDSCHEDULED TIMELAST NAMEFIRST NAMEIDPHOTO REQ.COMPLETENO SHOWOTHER REASON FOR NON-COMPLETION
216/02/2021SDF-03BUNNYBUGS7790103YESNONO ID
316/02/2021ABC-01STARKTONY8678989NOYES
416/02/2021ABC-02FUDDELMER9567875YESYES
517/02/2021ADF-09BANNERBRUCE10456760YESNOYES
617/02/2021ADF-09BUNNYBUGS11345646YESNONO ID
718/02/2021ABC-01STARKTONY12234532NOYES
816/02/2021ABC-02FUDDELMER13123418YESYES
916/02/2021ABC-011:01 PMSTARKTONY1234567NOYES
1018/02/2021SDF-032:15 PMFUDDELMER3456789YESYES
1118/02/2021ADF-091:30 PMBANNERBRUCE2345678YESNOYES
1216/02/2021SDF-029:15 AMBUNNYBUGS4567890YESNONO ID
1317/02/2021ABC-01STARKTONY5123446NOYES
1417/02/2021ABC-02FUDDELMER6012331YESYES
1516/02/2021ABC-01BANNERBRUCE6901217YESNOYES
16
17
18
19
2016/02/2021SDF-03
2118/02/2021ABC-01
22ADF-09
23DATESITE IDSCHEDULED TIMELAST NAMEFIRST NAMEIDPHOTO REQ.COMPLETENO SHOWOTHER REASON FOR NON-COMPLETION
2416/02/2021SDF-03BUNNYBUGS7790103YESNONO ID
2516/02/2021ABC-01STARKTONY8678989NOYES
2617/02/2021ADF-09BANNERBRUCE10456760YESNOYES
2717/02/2021ADF-09BUNNYBUGS11345646YESNONO ID
2818/02/2021ABC-01STARKTONY12234532NOYES
2916/02/2021ABC-011:01:00 PMSTARKTONY1234567NOYES
3018/02/2021SDF-032:15:00 PMFUDDELMER3456789YESYES
3118/02/2021ADF-091:30:00 PMBANNERBRUCE2345678YESNOYES
3217/02/2021ABC-01STARKTONY5123446NOYES
3316/02/2021ABC-01BANNERBRUCE6901217YESNOYES
34
Data
Cell Formulas
RangeFormula
A24:J33A24=IF(ISBLANK(FILTER(A2:J18,(A2:A18>=A20)*(A2:A18<=A21)*(COUNTIF(B20:B22,B2:B18)))),"",FILTER(A2:J18,(A2:A18>=A20)*(A2:A18<=A21)*(COUNTIF(B20:B22,B2:B18))))
Dynamic array formulas.
 
Upvote 0
This looks somewhat like what I'm hoping for. However, I need to be able to specify the Site IDs for it to look for (these are just samples, but I have roughly 600 ID numbers. Each corresponding to their own tab in the workbook). When I type it out it's giving me a #CALC error...There is no easy way to formulate the date range AND the specific site ID range is there? :/
 
Last edited:
Upvote 0
I need to be able to specify the Site IDs for it to look for
That is what Fluff has in cells B20:B22.
His formula has extracted all information from 16 Feb to 18 Feb for those three site ID's. In what way is that not meeting your request ..
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
 
Upvote 0
The site IDs and date ranges need to be typed in manually ahead of time so that I don't have to go into each one daily. I can't just have it selecting specific cells as the main data file isn't complete, it's a live report that comes out every morning. Therefore, I need to be able to set the formula up to watch the full array for the specified date ranges and site IDs without referring to a specific cell. I hope that makes sense.
 
Upvote 0
If you don't use cells to specify the date range & site ID's like I did in post#2 with A20:A2 & B20:B22, then how will the formula know what to look for?
 
Upvote 0
If you don't use cells to specify the date range & site ID's like I did in post#2 with A20:A2 & B20:B22, then how will the formula know what to look for?
I have the date range and the site ids, but NOT in the master file. That information won't get added until the morning of. The dates and locations are set, but the information for the people arriving and the data for each does not get populated until the morning of their appointment. I can enter the data into the formula of what I need it to look for, but I can't specify a cell as it could be cell A 32 or it could be cell A64, etc.
 
Upvote 0
How about
Excel Formula:
=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
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,332
Messages
6,124,313
Members
449,153
Latest member
JazzSingerNL

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