Lookup multiple conditions with horizontal and vertical fields.

SteynBS

Board Regular
Joined
Jun 27, 2022
Messages
111
Office Version
  1. 365
Platform
  1. Windows
Good day,

I am trying to lookup an array of data in columns, matching it by articles that is in a column, and size that is the header of a table. I have tried both Xlookup and Index,Match but I am missing something as I get a #Value or #N/A.

I have 2 sheets. This is in Sheet 3 (Table2). I need to return the values from Columns D:I matching the corresponding article and size(header)

1688059631451.png


This is sheet 2 (Table3). My formula is in Column E

1688059760906.png


This is the 2 formulas I attempted to use.

1) =INDEX(Table2[#All],MATCH(1,(Table2[[#All],[Article]]=[@Article])*(Table2[#Headers]=[@Size]),0))
2)=XLOOKUP(1,(Table2[[#All],[Article]]=[@Article])*(Table2[#Headers]=[@Size]),Table2[[XS]:[XXL]])
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
i have added all in 1 sheet to show the formula and using
=INDEX($D$2:$I$7,MATCH($A16,$A$2:$A$7,0),MATCH($C16,$D$1:$I$1,0))

Book1
ABCDEFGHI
1articleXSSMLXLXXl
2295154123456
3295156102030405060
42951581938577695114
5295160285684112140168
62951623774111148185222
72951644692138184230276
8
9
10
11
12
13
14
15articlesizemin qty
16295156L40
17295160xs28
18295156xxl60
19
Sheet1
Cell Formulas
RangeFormula
E16:E18E16=INDEX($D$2:$I$7,MATCH($A16,$A$2:$A$7,0),MATCH($C16,$D$1:$I$1,0))


Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
 
Upvote 0
Try
Excel Formula:
=INDEX(Table2[#All],MATCH([@Article],Table2[Article],0),match([@Size],Table2[#Headers],0))
 
Upvote 0
Solution
i have added all in 1 sheet to show the formula and using
=INDEX($D$2:$I$7,MATCH($A16,$A$2:$A$7,0),MATCH($C16,$D$1:$I$1,0))

Book1
ABCDEFGHI
1articleXSSMLXLXXl
2295154123456
3295156102030405060
42951581938577695114
5295160285684112140168
62951623774111148185222
72951644692138184230276
8
9
10
11
12
13
14
15articlesizemin qty
16295156L40
17295160xs28
18295156xxl60
19
Sheet1
Cell Formulas
RangeFormula
E16:E18E16=INDEX($D$2:$I$7,MATCH($A16,$A$2:$A$7,0),MATCH($C16,$D$1:$I$1,0))


Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
Thank you for the advise. I have had trouble using XL2BB in the past. Thank you very much for your time and assistance
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
you are welcome, glad its been solved for you
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,191
Members
453,021
Latest member
pingpong7117

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