Xlookup Query

mart_mrexcel

Active Member
Joined
Aug 23, 2008
Messages
310
Office Version
  1. 365
Platform
  1. Windows
In F4 I have a formula as =XLOOKUP(F2&F3,$A$2:$A$9&$B$2:$B$9,$C$2:$C$9,"",-1). My concern is, If I put range as 10, 11, 12, etc, it is returning the amount of 6500, the same thing happens if I put 20, 21, 22,etc it is returning as 5000, instead of 2000 (which in my expectation that anything >= 4 the value should be 2000.
ABCDDF
1GroupRangeAmt
2US16500GroupUS
3US25000Range10
4US34000Expected Amount2000
5US42000
6DS16000
7DS24500
8DS33500
9DS41500
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
If you can rely on Range being in ascending order then this might work for you.
Excel Formula:
=XLOOKUP(1,(A2:A9=F2)*(B2:B9<=F3),C2:C9,"",0,-1)
 
Upvote 1
Solution

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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