I'm attempting to retrieve data with both vertical and horizontal lookups. The product that I'm attempting to match is provided by the vertical lookup, and the dates are provided by the horizontal lookup. I have two sheets open with this lookup in progress. It appears to be functioning OK, however, for some reason the lookup retrieves the value below the correct value. This is quite strange. Could someone please glance at the formula and let me know what might be wrong?

Forecast2 column A contains the data that would correspond with the lookup value \$E59 (\$E59). The date is on page \$N\$1, the date headers are in Forecast2's \$G\$4:\$O\$4 section, and the actual data is on page \$G\$5:\$O\$52. Right now, my formula performs the search, but it enters the value below the correct value rather than the correct value itself. As an illustration, \$E59 corresponds to Row 5 on the Forecast2 sheet; yet, for some reason, it is sending me the value from Row 6. The algorithm then generates the value for row 7 if I adjust the value of \$E59 to correspond with what row 6's value is.
Nov 5, 2022 in Others 421 views

## 1 answer to this question.

Actually, your ranges are wrong. To correct it, you need to put your values in A5:A52 and then refer to A5:A52 in place of A4:A51. Hence, your formula would become

` =XLOOKUP(\$E59,Forecast2!\$A\$5:\$A\$52,XLOOKUP('Main Page'!N\$1,Forecast2!\$G\$4:\$O\$4,Forecast2!\$G\$5:\$O\$52))`
• 63,700 points

## Events & Threading in Windows Forms

I don't think you should be updating ...READ MORE

## Retrieve epay.info Balance with VBA and Excel

This code should log you in, provided ...READ MORE

Forget the PsychoPy complications for the time ...READ MORE

## In Blue Prism how to split excel column data into TWO columns

This is how I am doing it. Dim ...READ MORE

## Excel Power Query: Using List.MatchAny on a column value

try this. let TableA = ...READ MORE