vlookup - multiple lookup values

K

kec01

I have 2 spreadsheets. Each has an inventory number, a security
number and the second sheet has a duration. Each set of inventory
number and security number are on the same row of the spreadsheet.
The sheets don't match each other, though.

I'm struggling with how to create either an if/then or a vlookup
formula in which I say:

If (inventory number = inventory number) and (security number =
security number), then populate duration in a new cell. I've got an
if/then to work but it obviously relies on the pairs being on the same
row of both spreadsheet. I'm stuck with how to incorporate both
criteria into a vlookup formula.

Thanks for any help you can provide.
 
G

Guest

Assume data is in columns A,B and C (Inventory number, security number and
duration):

in Sheet1, column C:

=SUMPRODUCT(--(sheet2!A2:A100=A2),--(sheet2!B2:B100=B2),(sheet2!C2:C100))

copy down as required.

HTH
 
K

kec01

Assume data is in columns A,B and C (Inventory number, security number and
duration):

in Sheet1, column C:

=SUMPRODUCT(--(sheet2!A2:A100=A2),--(sheet2!B2:B100=B2),(sheet2!C2:C100))

copy down as required.

HTH








- Show quoted text -

I'm a real novice at this so my next question may be elementary. What
are the 2 short hyphens before the 2 instances of (sheet2?
 

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