excel magic trick 778, example 6

tpuck2687

New Member
Joined
Dec 12, 2013
Messages
20
Excel Magic Trick 778: INDEX & MATCH Lookup Functions Beginning To Advanced (18 Examples) - YouTube example 6. I have a table similar to this one without the descending numbers as "pipe size". My "pipe sizes" would have to be 0-2, 2.1-4, 4.1-6, 6.1-8, and >8.1. My rainfall would also have to be ranges 0-1000, 1000-2000, 2000-
3000, 3000-4000, and 4000-5000. The corresponding table values are......
[TABLE="width: 330"]
<colgroup><col width="73" style="width: 55pt; mso-width-source: userset; mso-width-alt: 2669;" span="6"> <tbody>[TR]
[TD="width: 73"]
[/TD]
[TD="width: 73, bgcolor: #D9D9D9"]1000[/TD]
[TD="width: 73, bgcolor: #D9D9D9"]2000[/TD]
[TD="width: 73, bgcolor: #D9D9D9"]3000[/TD]
[TD="width: 73, bgcolor: #D9D9D9"]4000
[/TD]
[TD="width: 73"]5000[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="bgcolor: transparent"]10[/TD]
[TD="bgcolor: transparent"]7[/TD]
[TD="bgcolor: transparent"]5[/TD]
[TD="bgcolor: transparent"]4[/TD]
[TD="bgcolor: transparent"]1[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]7[/TD]
[TD]5
[/TD]
[TD]4[/TD]
[TD]3[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD="bgcolor: transparent"]5[/TD]
[TD="bgcolor: transparent"]4[/TD]
[TD="bgcolor: transparent"]3
[/TD]
[TD="bgcolor: transparent"]2[/TD]
[TD="bgcolor: transparent"]1[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD]4
[/TD]
[TD]3[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD="align: right"]100
[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"]1[/TD]
[/TR]
</tbody>[/TABLE]

What value do I need to put in the 100 spot to show anything greater than 8?
if c51=5 and c52=2650 I would need c53=3 and I'm currently getting 5 with...
=INDEX(Sheet2!$G$5:$K$9,MATCH(Schaurer!C51,Sheet2!$F$5:$F$9,1),MATCH(Schaurer!C52,Sheet2!$G$4:$K$4,1))
 
is there a way to do it to keep my current table?

[TABLE="width: 330"]
<colgroup><col width="73" style="width: 55pt; mso-width-source: userset; mso-width-alt: 2669;" span="6"> <tbody>[TR]
[TD="width: 73"]Column1[/TD]
[TD="width: 73"]Column2[/TD]
[TD="width: 73"]Column3[/TD]
[TD="width: 73"]Column4[/TD]
[TD="width: 73"]Column5[/TD]
[TD="width: 73"]Column6[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD="bgcolor: #D9D9D9"]0to1000[/TD]
[TD="bgcolor: #D9D9D9"]1000to2000[/TD]
[TD="bgcolor: #D9D9D9"]2000to3000[/TD]
[TD="bgcolor: #D9D9D9"]3000to4000[/TD]
[TD]4000to∞[/TD]
[/TR]
[TR]
[TD]0to2[/TD]
[TD="bgcolor: transparent"]10[/TD]
[TD="bgcolor: transparent"]7[/TD]
[TD="bgcolor: transparent"]5[/TD]
[TD="bgcolor: transparent"]4[/TD]
[TD="bgcolor: transparent"]1[/TD]
[/TR]
[TR]
[TD]2.1to4[/TD]
[TD]7[/TD]
[TD]5[/TD]
[TD]4[/TD]
[TD]3[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]4.1to6[/TD]
[TD="bgcolor: transparent"]5[/TD]
[TD="bgcolor: transparent"]4[/TD]
[TD="bgcolor: transparent"]3[/TD]
[TD="bgcolor: transparent"]2[/TD]
[TD="bgcolor: transparent"]1[/TD]
[/TR]
[TR]
[TD]6.1to8[/TD]
[TD]4[/TD]
[TD]3[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]8.1to∞[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"]1[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
I see....... 1169 would fall between 1000 and 2000 but if I had 1000 it would need to fall between 0-1000 and if I had 2000 it would need to fall between 1000-2000. Im just having trouble getting numbers that fall EXACTLY as on of my ranges, ie 2,4,6 or 1000,2000, 3000, to fall in the right range. The last equation seemed to fix the numbers that fell on the row headers, now I need it to work for the column headers
 
Upvote 0
I see....... 1169 would fall between 1000 and 2000 but if I had 1000 it would need to fall between 0-1000 and if I had 2000 it would need to fall between 1000-2000. Im just having trouble getting numbers that fall EXACTLY as on of my ranges, ie 2,4,6 or 1000,2000, 3000, to fall in the right range. The last equation seemed to fix the numbers that fell on the row headers, now I need it to work for the column headers

Your answer should be either 1000 or 2000, not between..
 
Upvote 0
It needs to be in the second column range, 1000-2000, so I'm going to go with 2000 on that one?
[TABLE="width: 561"]
<COLGROUP><COL style="WIDTH: 48pt" width=64><COL style="WIDTH: 81pt; mso-width-source: userset; mso-width-alt: 3840" width=108><COL style="WIDTH: 48pt" span=9 width=64><TBODY>[TR]
[TD="class: xl66, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl66, width: 108, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]0[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]1000[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]2000[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]3000[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]4000[/TD]
[TD="class: xl66, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl66, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl66, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl66, width: 64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 108, bgcolor: transparent"] [/TD]
[TD="class: xl68, width: 64, bgcolor: transparent, align: right"]1000[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent, align: right"]2000[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent, align: right"]3000[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent, align: right"]4000[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent, align: right"]5000[/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]2[/TD]
[TD="class: xl66, bgcolor: transparent, align: right"]8[/TD]
[/TR]
[TR]
[TD="class: xl68, width: 64, bgcolor: transparent, align: right"]0[/TD]
[TD="class: xl65, width: 108, bgcolor: transparent, align: right"]2[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]10[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent, align: right"]7[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]5[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]4[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]0.66[/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]1169[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]2200[/TD]
[/TR]
[TR]
[TD="class: xl68, width: 64, bgcolor: transparent, align: right"]2[/TD]
[TD="class: xl65, width: 108, bgcolor: transparent, align: right"]4[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]7[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]5[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]4[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]3[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]0.88[/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl69, bgcolor: #c4d79b, align: right"]7[/TD]
[TD="class: xl69, bgcolor: #c4d79b, align: right"]2[/TD]
[/TR]
[TR]
[TD="class: xl68, width: 64, bgcolor: transparent, align: right"]4[/TD]
[TD="class: xl65, width: 108, bgcolor: transparent, align: right"]6[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]5[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]4[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]3[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]2[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]1[/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl68, width: 64, bgcolor: transparent, align: right"]6[/TD]
[TD="class: xl65, width: 108, bgcolor: transparent, align: right"]8[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]4[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent, align: right"]2[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]2[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]0.97[/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl68, width: 64, bgcolor: transparent, align: right"]8[/TD]
[TD="class: xl67, width: 108, bgcolor: transparent, align: right"]1.00E+308[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]0.5[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]2.4[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]0.8[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]3.4[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]6.2[/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[/TR]
</TBODY>[/TABLE]

J4, copied across:
Rich (BB code):
=INDEX($C$3:$G$7,MATCH(J$2,$A$3:$A$7,1)-(LOOKUP(J$2,$A$3:$A$7) = J$2),
  MATCH(J$3,$C$2:$G$2,1)+(LOOKUP(J$3,$C$2:$G$2) < J$3))
Rich (BB code):
 
Upvote 0
That's working great. Now I just have to adjust my table, spreadsheet, and a few cell lookup locations and I should be good. Thanks for your time and effort!!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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