#VALUE! error generated on Index : Index

mookyon

New Member
Joined
Dec 23, 2021
Messages
35
Office Version
  1. 365
Platform
  1. Windows
Dear All,

I am using Excel 365 and encountered a #VALUE! error in this (solely constants, no auxiliary variables) code segment:

=LET(_vec_,{10;4;78;19;5;15},
_rows_,ROWS(_vec_),
_min_,MIN(_vec_),
_pos_,XMATCH(_min_,_vec_),
_original_,MAX(INDEX(_vec_,_pos_):INDEX(_vec_,_rows_)),
_alternative_,MAX(INDEX(_vec_,SEQUENCE(_rows_-_pos_+1,1,_pos_,1))),
_original_
)


An alternative solution is also presented (just replace _original_ at the end of the LET function to _alternarive_). I prefer to use _original_ but it failed to perform.
Can someone decipher the root of this error.

-1000 THX
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
You get the error because you are feeding the INDEX function an array & not a range & so cannot use Index():Index().
Another option is to use
Excel Formula:
MAX(DROP(_vec_,_pos_))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,203
Messages
6,123,627
Members
449,109
Latest member
Sebas8956

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