# Is there a MaxPosition function? [duplicate]

The Max and Min functions return values, but I would like to have the position(s). Is there a standard function that does this? Could not find one.

• None that I know of but Ordering[#, -1] & might help. – Henrik Schumacher Feb 24 '18 at 11:54
• @henrik Schumacher oke that is better then using position. Thx – Lou Feb 24 '18 at 15:13
• If you know an upper bound, could do with Nearest as follows: In[271]:= Nearest[{2, 1, 3, 8, 2, 8, 5} -> "Index", 1000] Out[271]= {4, 6} – Daniel Lichtblau Feb 24 '18 at 20:06