View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bondi
 
Posts: n/a
Default Offset, VHookup - Confused


StephanieH wrote:
Currently, I'm using Hlookup to find an employee's name, then return the
value in the cell directly below. However, I also need to get the value in
the cell directly to the right of that value. For instance if I'm looking
for John Doe and his name appears in cell b29, I need to return the values in
B30 and B31.

Here's what currently returns the valuein B30
=HLOOKUP(C5,'Jan 06'!B29:Y30,2,FALSE)
I see several references to Index/Match/Indirect... I'm confused.
How do I get the value in B31 in a new cell?


Hi StephanieH,

One way would be to use an array formula along the line of this:

=TRANSPOSE(HLOOKUP(C5,'Jan 06'!B29:Y31,{2,3},FALSE))

If use this formula you should enter it in a cell then highlight the
cell and the cell directly below it. The hit F2 and press Ctrl + Shift
+ Enter.

The values from row 2 and 3 in your lookup array (B30 and B31) should
now be on top of eachother. (If you want them horizontaly drop the
Transpose and highlight the cell with the formula and the cell to the
right of it)

Regards,
Bondi