I'm doing some online sheet/excel tutorial and encountered a problem. My hlookup is not working because the lookup value is not in the first row of the table HLOOKUP Error. So I work my way around it by adding a row at the top HLOOKUP Working but this doesnt look professional. Is there an alternative function or way to solve this without changing the table or adding row?
P.S. I know the answer can be seen directly but I'm preparing for a larger dataset.
CodePudding user response:
Good Day,
try this one for the "Lowest Monthly Average":
=INDEX(B1:M1,1,MATCH(B14,B12:M12,0))
and this one for the "Highest Monthly Average":
=INDEX(B1:M1,1,MATCH(B15,B12:M12,0))
Hope it is what you are looking for.
CodePudding user response:
If you have the latest version of excel, then xlookup() will work.
Not sure that exists in googlesheets.
CodePudding user response:
its done like this:
=HLOOKUP(B14; {B12:12; B1:1}; 2; 0)