Search code examples
google-sheetsgoogle-sheets-formula

Vlookup can't find a value that comes from a formula


I made a stock portfolio in google sheets and I want to lookup the biggest gains and smallest gain/loss for the day. I used the formula =max(range) to get the biggest gain, so far so good. However, I also want to find out which stock this is, for this I used the formula =vlookup(the value from the =max formula,range,column,true however the outcome is #N/A because it can not find the value that comes from the =max formula.

picture of the error picture of what it should lookup

I've tried to use different formula's but those are not applicable for what I'm trying to use


Solution

  • You may try:

    =xlookup(H6, Portfolio!Q3:Q27, Portfolio!A3:A27, )