XLookup With Multiple Criteria

acool

Board Regular
Joined
Feb 10, 2023
Messages
110
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone,

I am currently trying to complete an XLookup based on the values in Column in G and H. If Column H matches the Value in Column A (Merged Cells) and the value in column G falls between the values Column in B & C, I would like to return the price in Column E. Any help/insight would be greatly appreciated! Thank You!
1682007468684.png
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
If I am reading your data correctly, none of the data above would return a price from Column E, is that an accurate statement?
 
Upvote 0
Need to unmerge and repeat the values in column A.
I may have typos, If you need this flushed out better please post a mini worksheet using the xl2bb (link below) add in.
Images help describe the problem, but the forum need to manually create scenarios from images.
If you can't use the xl2bb then please post the data and expected results as a table.

Excel Formula:
=INDEX($A$3:$A$12,(--($B3>=$G$3:$G$12))*(--($B3<=$G$3:$G$12))*(Row($H$3:$H$12)-3)
 
Upvote 0
If I am reading your data correctly, none of the data above would return a price from Column E, is that an accurate statement?
@Anfinsen As an example, an Oversized Item with a weight of 4.2 Lbs should return a value of $9.43
 
Upvote 0
correction:
Excel Formula:
=INDEX($E$3:$E$12,(--($B3>=$G$3:$G$12))*(--($B3<=$G$3:$G$12))*(Row($H$3:$H$12)-3)*(--($H3 = A$3:$A$12))
 
Upvote 0
@awoohaw Shouldn't it be
Probably I was just trying to type it. I didn't have it in a worksheet. The xl2bb mini would help would help.

in cell I3:
Excel Formula:
=INDEX($E$3:$E$12,(--($B3>=$G$3:$G$12))*(--($C3<=$G$3:$G$12))*(Row($I$3:$I$12)-3)*(--($H3 = A$3:$A$12))
 
Upvote 0
Is this the right idea?

XLookup Answer.xlsx
ABCDEFGH
1Removal Fee per Unit
2
3Standard Size00.5$0.974.2Oversize$9.43
4Standard Size0.51$1.462Oversize$4.07
5Standard Size12$2.202Oversize$4.07
6Standard Size02$2.832Oversize$4.07
7Oversize01$3.122Oversize$4.07
8Oversize12$4.070.4Standard Size$0.97
9Oversize24$5.562Oversize$4.07
10Oversize410$9.432Oversize$4.07
11Oversize010$13.0514Oversize 
12Oversize0.4Oversize$3.12
Sheet1
Cell Formulas
RangeFormula
H3:H12H3=XLOOKUP(1,($G3=$A$3:$A$12)*($F3>=$B$3:$B$12)*($F3<=$C$3:$C$12),$D$3:$D$12,"")
 
Upvote 0
Solution
Is this the right idea?

XLookup Answer.xlsx
ABCDEFGH
1Removal Fee per Unit
2
3Standard Size00.5$0.974.2Oversize$9.43
4Standard Size0.51$1.462Oversize$4.07
5Standard Size12$2.202Oversize$4.07
6Standard Size02$2.832Oversize$4.07
7Oversize01$3.122Oversize$4.07
8Oversize12$4.070.4Standard Size$0.97
9Oversize24$5.562Oversize$4.07
10Oversize410$9.432Oversize$4.07
11Oversize010$13.0514Oversize 
12Oversize0.4Oversize$3.12
Sheet1
Cell Formulas
RangeFormula
H3:H12H3=XLOOKUP(1,($G3=$A$3:$A$12)*($F3>=$B$3:$B$12)*($F3<=$C$3:$C$12),$D$3:$D$12,"")
This Worked, thank you
 
Upvote 0

Forum statistics

Threads
1,215,752
Messages
6,126,672
Members
449,327
Latest member
John4520

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