View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier[_3_] Roger Govier[_3_] is offline
external usenet poster
 
Posts: 2,480
Default VLOOKUP Function to return values in multipal Columns

Hi

From your description the data to be looked up, starts in column B and ends
in column E of Sheet1.
I assume that you are always wanting to look up the value from Column C of
the Result Sheet sheet.

If that is the case, then in your first cell enter
=VLOOKUP($C5,Sheet1!$B$1:$E$16,COLUMN(C1),0)
Copy across (and down) as required.

The third Argument, the offset from the first column in the dataset being
looked up, Column(C1) will return 3, as column C is column 3.
As you drag across, the column reference will step up to D, E etc, hence the
offset will step up to 3, 4 etc. and pick up your required data.

Note the Absolute $C5. This fixes column C of results sheet as the item
being looked up, otherwise it would alter to D5, E5 as you copy across, and
would fail.
--
Regards
Roger Govier

"KP" wrote in message
...
I'm using the VLOOKUP function to look up value in another sheet and
return
the corresponding value, My problem is It works for the first column but
the
how do I get the next 4 columns

Sheet 1 has the date that needs to be looked up and once the Employee name
is found then return the corresponding values in Column D,E,F
Sheet 1
C D E F

Employees Volume Hours VPH

ABC 100 10 3.3


Result Sheet

Formula being used

=VLOOKUP(C5,Sheet1!B$1:C$16,2,FALSE) to Match the name and get the value
in
column D in Sheet 1


=VLOOKUP(D5,Sheet1!C$1:D$16,2,FALSE) to get the value of Column E in Sheet
1
for the above match.

Hope I explained this correctly.
--
Thanks

KP