vlookup in stockhistory table

New Contributor

hi all,

i want to create a sheet that follows some stocks and tells me every stock when it was at the highes price since it was added to the sheet. for that i'm using vlookup that works on a table from "stockhistory" function. somehow instead of getting the real date of the max price, i get the latest date. i used "evaluate formula" to try debugging what's wrong. the vlookup reached the table correctly but didnt fit between the max value to its date and i dont know why. i'm adding the debugging window.197282036_837814776816217_3414105826048912022_n.png197450678_905382646708468_804537938393458325_n.png

7 Replies
best response confirmed by allyreckerman (Microsoft)


As variant




will it work without physically showing the table?
it returns the last row again...






Could you please share the file with the sample?

@Sergei Baklan 

the solution of index and xmatch works. didnt understand exactly how... andi dont know why vlookup didnt work


With XMATCH() we find position of max looking for any big number and returning position of it or next smaller number which will be our max. INDEX() returns data on this position.


Why doesn't VLOOKUP() work - hard to say without the sample.