Return value from table based on 2 criteria with partial word match

kk1352

New Member
Joined
Nov 7, 2015
Messages
4
Hi All,


I am trying to work out a formula which allows me to return a value from a table based on 2 criteria with partial word match. I have an example below.


I would greatly appreciate any assistance!


Thanks

GroupDate
Apples10/2/18

<tbody>
</tbody>

Fruit (month)Start DateEnd Date
Apples (Jan)1/1/1830/1/18
Apples (Fab)1/2/1825/2/18
Apples (Mar)1/3/1830/3/18
Bananas (Feb)1/2/1829/2/18
Oranges (Feb)4/2/1820/2/19

<tbody>
</tbody>

Fruit (month)

<tbody>
</tbody>

I would like to return a value from Fruit (month) column based on word typed in Group if date sits between that particular fruit's start and end date
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Not the most elegant solution but I think it does what you want. Note this is an array formula so enter with CONTROL-SHIFT-ENTER. Hopefully cell locations are obvious

=INDEX($A$5:$A$9,MATCH(A2,LEFT(IF(NOT(1-(B2>=$B$5:$B$9)*(B2<=$C$5:$C$9)),$A$5:$A$9),LEN(A2)),0))
 
Upvote 0
Not the most elegant solution but I think it does what you want. Note this is an array formula so enter with CONTROL-SHIFT-ENTER. Hopefully cell locations are obvious

=INDEX($A$5:$A$9,MATCH(A2,LEFT(IF(NOT(1-(B2>=$B$5:$B$9)*(B2<=$C$5:$C$9)),$A$5:$A$9),LEN(A2)),0))


Perfect, thank you!
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,272
Members
449,075
Latest member
staticfluids

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