Vlookup and sum

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?
 
L

Luke M

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)
 
B

Bernie Deitrick

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top