Find the match if given number is between the two ranges of number

mark692

Active Member
Joined
Feb 27, 2015
Messages
321
Office Version
  1. 2016
Platform
  1. Windows
hi guys I have two ranges of number in column D and column E, I want to get the fruit in column F if the given number on A2 is between the range of the numbers on column D and column E. I have a sample below. thank you


Book1
ABCDEF
1NumberFruitStartEndFruits
28grapes15apple
3610grapes
41115avocado
51620orange
6
7
Sheet1
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi mark692,

Try this formula in cell B2:

=IF(ISNUMBER(A2)=TRUE,LOOKUP(A2,$D$2:$D$5,$F$2:$F$5),"")

Regards,

Robert
 
Upvote 0
Solution
How about:
Code:
=INDEX(F1:F5,SUMPRODUCT((A2>=D2:D5)*(A2<=E2:E5)*ROW(2:5)))

or
Code:
=LOOKUP(A2,D2:D5,F2:F5)
 
Upvote 0

Forum statistics

Threads
1,214,980
Messages
6,122,563
Members
449,088
Latest member
Motoracer88

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