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))
 
in post number 6 of this thread a comma got replaced with a / (Schaurer!C52/1000) did you cut and paste this and is this problem??
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I did just copy and paste to start nd changed it up a little but when I tried to replace / with , it said there are to many arguments. this is what I have now =INDEX(Sheet2!$G$5:$K$9,MATCH($C$51,LEFT(Sheet2!$F$5:$F$9,1)*1,1),MATCH($C$52/1000,LEFT(Sheet2!$G$4:$K$4,1)*1,1))
 
Upvote 0
That's exactly what I needed! Some people just don't see the ranges unless I mark them accordingly, so I had to put them in. Thanks for the help!!

More convenient...

[TABLE="width: 513"]
<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=8 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]
[/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"]1[/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: 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"]1[/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]1000[/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"]1[/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: transparent"] [/TD]
[TD="class: xl66, bgcolor: transparent, align: right"]10[/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]
[/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: xl65, 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"]1[/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"]1[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]1[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]1[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]1[/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]
[/TR]
</TBODY>[/TABLE]

J4:

=INDEX($C$3:$G$7,MATCH($J2,$A$3:$A$7,1),MATCH(MAX(J$3,1000),$C$2:$G$2,1))
 
Last edited:
Upvote 0
when you put in an 8 and 1169 you still get a 1 for the answer and it should be a 3 so I'm not sure that's working either.
 
Upvote 0
It should be any values over 8 are 1. The ranges should 0-2 2.1-4 4.1-6 etc

Would you take a look at the exhibit in #13 and say what should be retrieved for the combination of 8 and 1169?

Note. 1.00E+308 is the display foem of a big number that is: 9.99999999999999E+307. It is used here to express the interval 8 and >8.
 
Upvote 0
I would want 8(≤8) to be on the second to last line and anything over 8(>8) to be the last line. That would be the same for all numbers. 2 should be on the first line not the second
 
Upvote 0
I would want 8(≤8) to be on the second to last line and anything over 8(>8) to be the last line. That would be the same for all numbers. 2 should be on the first line not the second

Would you check
Rich (BB code):
=INDEX(C$3:$G$7,
  MATCH(J2,$A$3:$A$7,1)-(LOOKUP(J$2,$A$3:$A$7)=J$2),
  MATCH(J$3,$C$1:$G$1,1))
whether it behaves as intended regarding column headers?
 
Upvote 0
that seems to be working for the first column numbers 2,4,6 and 8 now I would need the first row to do the same with 1000,2000,3000 and 4000
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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