Forum Discussion
fidtal
Jun 09, 2021Copper Contributor
vlookup in stockhistory table
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.
7 Replies
- SergeiBaklanDiamond Contributor
- fidtalCopper Contributorit returns the last row again...
- SergeiBaklanDiamond Contributor
Could you please share the file with the sample?
- fidtalCopper Contributorwill it work without physically showing the table?
- SergeiBaklanDiamond Contributor
Yes
=LET(stock,STOCKHISTORY("msft",TODAY()-90,TODAY(),0,2,0,3),INDEX(stock,XMATCH(10000000000,INDEX(stock,,2),-1),{1,2}))