Question about { }

dreid1011

Well-known Member
Joined
Jun 4, 2015
Messages
3,614
Office Version
  1. 365
Platform
  1. Windows
I recently helped on this thread:

https://www.mrexcel.com/forum/excel-questions/1045469-between-if-excel-formula-help.html
post #10 with my suggested solution

I feel like there should be a more compact way to use PERCENTILE/AGGREGATE in this manner. However, when I tried to use INDEX/MATCH inside {} to establish the upper and lower bounds of the array, Excel would have none of it.

I am not against using helper cells/columns, it just feels like I COULD have come up with something in a single cell.

Any and all thoughts on this are most welcome.

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)
Last edited:
Upvote 0
Upvote 0
DRSteele, I appreciate the links. However, I don't believe I stated very clearly what I was questioning. Basically, I tried using this:

=PERCENTILE({INDEX/MATCH,INDEX/MATCH},.5)

Which, in the link from #1 , would look something like this:

=PERCENTILE({.25,.50},.5)
=PERCENTILE(V6:W6,.5)

I wasn't trying to get INDEX to return an array, but use it two times, once to identify the lower bound, and another for the upper bound. Excel wouldn't let me even enter the formula with INDEX inside the {}.
 
Upvote 0
Excel doesn't accept this formula format for me either:
=PERCENTILE({INDEX/MATCH,INDEX/MATCH},0.5)

Excel does accept this, where the curly braces are replaced by parentheses:
=PERCENTILE((INDEX/MATCH, INDEX/MATCH),0.5)
or this, where INDEX functions are used on both sides of the range operator colon:
=PERCENTILE(INDEX/MATCH:INDEX/MATCH, 0.5)

When I run the last two formulas through formula evaluation, both properly interpret the INDEX functions as references. Interesting.
 
Last edited:
Upvote 0
Excel doesn't accept this formula format for me either:
=PERCENTILE({INDEX/MATCH,INDEX/MATCH},0.5)

Excel does accept this, where the curly braces are replaced by parentheses:
=PERCENTILE((INDEX/MATCH, INDEX/MATCH),0.5)
or this, where INDEX functions are used on both sides of the range operator colon:
=PERCENTILE(INDEX/MATCH:INDEX/MATCH, 0.5)

When I run the last two formulas through formula evaluation, both properly interpret the INDEX functions as references. Interesting.

Good to know. I kept thinking about that, but never tried it thinking that it wouldn't work if I didn't concatenate stuff.
 
Upvote 0
After testing, the first formula using (INDEX/MATCH,INDEX/MATCH) returns expected results.

The second formula using INDEX/MATCH:INDEX/MATCH did not return expected results. It returned an array of the first 3 rows of the table it was referencing.

Now, I have also learned that Excel does not like either of these options using the other LOOKUP formula I ended up using for the other half of the problem.

And now, if you looked at my other post, here is the final resulting formula. The only extra cells being the lookup table in V1:W4.

Code:
=PERCENTILE(CHOOSE({1,2},LOOKUP(INDEX(V1:V4,MATCH(G5,V1:V4,1)),C5:F5,C4:F4),LOOKUP(INDEX(W1:W4,MATCH(G5,W1:W4,-1)),C5:F5,C4:F4)),(G5-INDEX(V1:V4,MATCH(G5,V1:V4,1)))/(INDEX(W1:W4,MATCH(G5,W1:W4,-1))-INDEX(V1:V4,MATCH(G5,V1:V4,1))))*B6

And I also realize that I was asking after using INDEX/MATCH within {} originally, it was not taking LOOKUP within {} either. So, apologies for the backwardness of my query.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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