VLOOKUP Query

User avatar
VegasNath
5StarLounger
Posts: 1185
Joined: 24 Jan 2010, 12:02
Location: Wales, UK.

VLOOKUP Query

Post by VegasNath »

Hi,

This formula is in I4035
=VLOOKUP((B4035&"WRO"),A:A,1,FALSE)
But I only need to lookup A4:A4035
But when dragged down to I4036, becomes:
=VLOOKUP((B4036&"WRO"),A4:A4036,1,FALSE)

IOW, lookup row 4 to the row containing the formula, but not below. Is this possible?
:wales: Nathan :uk:
There's no place like home.....

PJ_in_FL
5StarLounger
Posts: 1108
Joined: 21 Jan 2011, 16:51
Location: Florida

Re: VLOOKUP Query

Post by PJ_in_FL »

Try making the lookup ranges absolute instead of relative.
PJ in (usually sunny) FL

User avatar
VegasNath
5StarLounger
Posts: 1185
Joined: 24 Jan 2010, 12:02
Location: Wales, UK.

Re: VLOOKUP Query

Post by VegasNath »

:doh: :stupidme: Yes, I need the upper range absolute and the lower range relative. :stupidme:

Thanks PJ.
:wales: Nathan :uk:
There's no place like home.....

PJ_in_FL
5StarLounger
Posts: 1108
Joined: 21 Jan 2011, 16:51
Location: Florida

Re: VLOOKUP Query

Post by PJ_in_FL »

To make a relative lower limit of the range, in I4036 use the formula:
=VLOOKUP((B4036&"WRO"),$A$4:offset(B4036,-1,-1),1,FALSE)

The offset function should set the lower limit to one row less and one column less than the referenced location, i.e. to row 4036-1 = row 4035 and column (b)-1 = column (a). Does this accomplish what you want?
PJ in (usually sunny) FL