Multiple Conditions for Lookup (index/match) Columns

SBW87

New Member
Joined
Jan 22, 2019
Messages
2
Hi!

I am trying to return the size of a selection, when I specify the type and output required, which may not match the exact output, and therefore needs to find the closest match, for a certain type.

ABCDEF
1TypeOutputSizeTypeSingle
2Single200300Output175
3Double100150SizeXXXX
4Single300450
5Double200300

<tbody>
</tbody>

Any ideas would be greatly appreciated, many thanks.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Welcome to Mr Excel forum

Try this array formula in F3
=INDEX(C$2:C$5,MATCH(MIN(IF(A$2:A$5=F1,ABS(B$2:B$5-F2))),IF(A$2:A$5=F1,ABS(B$2:B$5-F2)),0))
confirmed with Ctrl+Shift+Enter, not just Enter

Hope this helps

M.
 
Upvote 0
Thank you so much!

I think that has worked perfectly, would you mind, whenever you have time, explaining the main functions in the formula?
 
Upvote 0
You are welcome. Glad to help.

The formula uses built-in functions: INDEX, MATCH, MIN, IF, ABS
Take a look at the help file.

M.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,255
Members
449,075
Latest member
staticfluids

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