Vlookup and sum

  • Thread starter Thread starter Pammy
  • Start date Start date
P

Pammy

I have a worksheet that in column A lists employee #'s, in column B, # of
hours worked. In Column M, I want to create a formula that will lookup an
employee # in Column A, get the hours worked in column B, then go to another
worksheet, look in column c find that empl # and get the hours worked in
column d, then give a total of hours worked in column M on my main
worksheeet. Is this possible?
 
Assuming Employee number is listed in a cell, say Z2, why not use something
like this:

=SUMIF(A:A,Z2,B:B)+SUMIF('Sheet2'!C:C,Z2,D:D)
 
Pammy,

In M, use a formula like

=VLOOKUP(Emp#,A:B,2,False)+VLOOKUP(Emp#,Sheet2!C:D,2,False)

Where Emp# is a cell with the value of interest.

HTH,
Bernie
MS Excel MVP
 
Back
Top