Matching with multiple criteria

jkackley724

New Member
Joined
Sep 7, 2017
Messages
1
I'm trying to write a formula that returns a specific date from an array based on two criteria.

Spreadsheet set up:
Row 1 A1:H1 (array of dates)
Row 2 A2:H2 (series of number, 0,4,8,12, etc.)
Column A3:A6 (series of numbers, 0,3,5,8,13,14, etc.)

I want to populate B4:B6 with dates, based on the numbers in A3:A6 and A2:H2. When the number in A4 is greater than the numbers in A2:H2 but also less than or equal to the numbers in A2:H2, I want that date returned. Example below, when 5 is between 4 & 8, I want the date when that occurs (January 31, 2018). Is this possible?


[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]12/31/2017[/TD]
[TD]1/31/2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]4[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]1/31/2018[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
=index($a$1:$h$1,match(sumproduct(large((($a$2:$h$2-a3>=0)*($a$2:$h$2)),countif($a$2:$h$2,">="&a3))),$a$2:$h$2,0))
 
Upvote 0
Control+shift+enter, not just enter:

=IFERROR(INDEX($A$1:$H$1,MATCH(1,IF(ISNUMBER($A$1:$H$1),IF($A$2:$H$2>=$A3,IF($A3<=$A$2:$H$2,1))),0)),"")
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

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