Excel - using Index and Match - adjusting the Match function's array input

JLoewen

New Member
Joined
Jun 20, 2018
Messages
29
This is a complicated question to ask and I am not sure exactly how to ask it. I am attempting to make a pipe sizing tool to speed up one of my work processes. The procedure is pretty straight forward. Do some math to figure out GPM going to drain (done elsewhere) and then look up the pipe size required for the pipe slope specified. We use the table below (Plumbing Code).

I need to have the spreadsheet pick the appropriate column for pipe slope (typically 1/8" per foot), and then use the MATCH -1 function to pick the first row that is greater than the required GPM capacity calculated elsewhere in the spreadsheet. From there, it needs to index and pick out the pipe size.

I am not sure how to tell MATCH to pick a specific array to match to based on a dynamic input (pipe slope). Any suggestions?

[TABLE="width: 562"]
<colgroup><col span="3"><col><col span="3"></colgroup><tbody>[TR]
[TD][/TD]
[TD="colspan: 2"]Table 1106.2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="colspan: 3"]Storm Drain Pipe Sizing[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="colspan: 6, align: center"]Capacity (GPM)[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Pipe Size (inches)[/TD]
[TD][/TD]
[TD="colspan: 4"]Slope of Horizontal Drain[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Vertical[/TD]
[TD]1/16" per foot[/TD]
[TD]1/8" per foot[/TD]
[TD]1/4" per foot[/TD]
[TD]1/2" per foot[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: center"]15"[/TD]
[TD="align: center"]5543[/TD]
[TD="align: center"]2508[/TD]
[TD="align: center"]3546[/TD]
[TD="align: center"]5016[/TD]
[TD="align: center"]7093[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]12"[/TD]
[TD="align: center"]3272[/TD]
[TD="align: center"]1480[/TD]
[TD="align: center"]2093[/TD]
[TD="align: center"]2960[/TD]
[TD="align: center"]4187[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]10"[/TD]
[TD="align: center"]2050[/TD]
[TD="align: center"]927[/TD]
[TD="align: center"]1311[/TD]
[TD="align: center"]1855[/TD]
[TD="align: center"]2623[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]8"[/TD]
[TD="align: center"]1117[/TD]
[TD="align: center"]505[/TD]
[TD="align: center"]714[/TD]
[TD="align: center"]1010[/TD]
[TD="align: center"]1429[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]6"[/TD]
[TD="align: center"]538[/TD]
[TD="align: center"]243[/TD]
[TD="align: center"]344[/TD]
[TD="align: center"]487[/TD]
[TD="align: center"]689[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]5"[/TD]
[TD="align: center"]311[/TD]
[TD="align: center"]117[/TD]
[TD="align: center"]165[/TD]
[TD="align: center"]234[/TD]
[TD="align: center"]331[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]4"[/TD]
[TD="align: center"]180[/TD]
[TD="align: center"]81[/TD]
[TD="align: center"]115[/TD]
[TD="align: center"]163[/TD]
[TD="align: center"]231[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]3"[/TD]
[TD="align: center"]87[/TD]
[TD="align: center"]39[/TD]
[TD="align: center"]55[/TD]
[TD="align: center"]79[/TD]
[TD="align: center"]111[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]2"[/TD]
[TD="align: center"]34[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]22[/TD]
[TD="align: center"]31[/TD]
[TD="align: center"]44[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Something like


Excel 2013/2016
ABCDEFGHI
1Pipe Size (inches)Slope of Horizontal Drain
2Vertical1/16" per foot1/8" per foot1/4" per foot1/2" per footSlope1/8" per foot
3915"55432508354650167093GPM45
4812"32721480209329604187Pipe4"
5710"2050927131118552623
668"111750571410101429
756"538243344487689
845"311117165234331
934"18081115163231
1023"87395579111
1112"3415223144
Data
Cell Formulas
RangeFormula
I4=INDEX(B3:B11,MATCH(I3,INDEX(C3:G11,0,MATCH(I2,C2:F2,0)),-1))
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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