Search row for 4 criteria - return row if all criteria is met

Doodle24

New Member
Joined
Aug 4, 2022
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Hello All,

I have tried to formulate something that searches through rows to meet 4 criterias. If all criteria is met I need the row number or the entire row returned, if not continue the search. Half of my criteria is straight forward BLUE=BLUE, GREEN=GREEN while the other two needs to be within a range. For example, 1 day +- from a specific date in a cell or +-500 from a specific number in a cell. I usually use if loops, vlookup and index/match but it seems I have to get into VBA with this.. Any suggestions? Thanks so much for any ideas on how to tackle this!
 
Will your datasets always pair so neatly?

I'd start the analysis along these lines:

ABCDEFGHIJKLM
1Possible
2CostIDDateLengthColour1Colour2LocationMatches?
3695123413 May 20226820GreenVioletNYABCDEFGH
4BlahBlahBlahBlahBlahBlahBlahn/a
5
6Possible
7MinDateDateMaxDateMinLLMaxLColour1Colour2IDNameMatches?
81 May 202231 May 2022GreenVioletABCD1234
9BluhBluhBluhBluhBluhBluhBluhBluhBluhBluhn/a
105 May 202217 May 2022GreenVioletEFGH1234
Sheet1
Cell Formulas
RangeFormula
I3:J3,I4I3=TRANSPOSE(FILTER(J$8:J$10,(H$8:H$10=F3)*(I$8:I$10=G3)*(B$8:B$10<=D3)*(D$8:D$10>=D3),"n/a"))
L8:L10L8=TRANSPOSE(FILTER(C$3:C$4,(F$3:F$4=H8)*(G$3:G$4=I8)*(D$3:D$4>=B8)*(D$3:D$4<=D8),"n/a"))
Dynamic array formulas.
Thanks Steven, this works!! I appreciate you taking time and looking into the problem. I guess I have to get more familiar with the Filter function - its a great tool. I would wish to have something automated but this is a good solution too.
 
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,223,907
Messages
6,175,300
Members
452,633
Latest member
DougMo

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