XLOOKUP - if 2 cells = certain criteria, then return 3rd value.

EddieD

New Member
Joined
Jun 12, 2014
Messages
30
Office Version
  1. 365
Platform
  1. MacOS
Hi all,
im struggling with this one a bit.

I have 2 tabs with almost the same data, except my Tab2 contains more complex calculations to get a result. That result (in column C) i want to place on TAB 1 (same column).

I would like to perform an X Lookup, that says - Lookup the SKU in Tab1, A1, and make sure that it matches B2 on the same row, then produce the result from column C.



TAB 1

SKULocationJanuary Sales QTY
Car-123USAReturn figure from Tab 2
Car-123CanadaReturn figure from Tab 2
Car-456USAReturn figure from Tab 2
Car-456CanadaReturn figure from Tab 2


TAB 2

SKULocationJan Sales QTY
Car-123USA125
Car-123Canada667
Car-456USA441
Car-456Canada335
 
@EddieD , it would be helpful to know which formula you are trying to use. I for one, am unsure if you are asking for a pure lookup or a sum of lookups (which @DanteAmor and @Fluff have provided solutions for, I think).
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Check the name of the sheet.
Try:
Excel Formula:
=XLOOKUP(A2&B2,'Tab 2'!A:A&'Tab 2'!B:B,'Tab 2'!C:C)
 
Upvote 0
Check the name of the sheet.
Try:
Excel Formula:
=XLOOKUP(A2&B2,'Tab 2'!A:A&'Tab 2'!B:B,'Tab 2'!C:C)

I assumed that tab1 and tab2 were just fake tab names for his example.
@EddieD , but @DanteAmor 's formula does stress using apostrophes when there are blanks in the Tab name. So, please look at that.
 
Upvote 0
in Cell C2 of Tab1 try:

Excel Formula:
= XLOOKUP(A2&B2,Tab2!A2:A50&Tab2!B2:B50,Tab2!C2:C50)

proof of concept:
Book1
ABCDEFGH
1SKULocationJan Sales QTY
2Car-123USA125Car-123Canada667
3Car-123Canada667
4Car-456USA441
5Car-456Canada335
Sheet1
Cell Formulas
RangeFormula
H2H2=XLOOKUP(F2&G2,A2:A5&B2:B5,C2:C5)
Hi there.
This was the solution that ultimately worked. Thank you very much.
 
Upvote 0

Forum statistics

Threads
1,215,172
Messages
6,123,438
Members
449,100
Latest member
sktz

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