match multiple columns

rachelby

New Member
Joined
Oct 30, 2018
Messages
3
Hello!

I need help on using the match function across multiple columns. Here is my example:

CapacitiesAngleAngleAngle
Width0 deg5 deg10 deg
32555
444333
18433420290
12306285222

<tbody>
</tbody>

Capacity315
Angle10 deg

<tbody>
</tbody>

I want a cell to return the width: 32

I want to be able to specify the Column (Angle) and a Capacity value and return the Width that has the closest Capacity value greater than specified Capacity.

I know how to use the INDEX and MATCH functions together for a single column, but not on multiple columns.

A less elegant way is to use nested IF's like so:
=IF(ANGLE="0 deg",INDEX(A3:A5,MATCH(CAPACITY,B3:B5,-1)),IF(ANGLE="5 deg",INDEX(A3:A5,MATCH(CAPACITY,C3:C5,-1)),IF(ANGLE="10 deg",INDEX(A3:A5,MATCH(CAPACITY,D3:D5,-1)),"")))

I have a table with multiple columns and don't want to write an "IF" for each column. I want a formula to know use the MATCH function on the specified column.

Thank you!
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
is it something like the below?

=INDEX(A:A,MATCH("10 deg",CHOOSE(MATCH(CAPACITY,$B$2:$D$2,0),B:B,C:C,D:D),-1))

where the choose function will dictate which column the match will perform its function on. If therer are more degrees to choose from expand the choose function out.
 
Upvote 0
Another option


Excel 2013/2016
ABCDEF
1CapacitiesAngleAngleAngle
2Width0510
332555444333315
41843342029010
51230628522232
Sheet2
Cell Formulas
RangeFormula
F5=INDEX(A3:A5,MATCH(F3,INDEX(B3:D5,0,MATCH(F4,B2:D2,0)),-1))
 
Upvote 0
Another option

Excel 2013/2016
ABCDEF
1CapacitiesAngleAngleAngle
2Width0510
332555444333315
41843342029010
51230628522232

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet2

Worksheet Formulas
CellFormula
F5=INDEX(A3:A5,MATCH(F3,INDEX(B3:D5,0,MATCH(F4,B2:D2,0)),-1))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

THANK YOU!!! WORKED PERFECTLY!
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,213,558
Messages
6,114,296
Members
448,564
Latest member
ED38

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