How do I do a VLOOKUP from 2 ranges and add the results together?

W

Wendy

Example:

First range (on first worksheet):
Col B has names, Col E has numbers
Scott 20
Clark 25
Jones 30

Second range (on another worksheet):
Col B has names, Col E has numbers
Scott 15
Davis 12
Jones 10

Since Clark is not on the second worksheet, I don't get any results for
Clark using my function....if it works right, it should yield 25, but it
isn't. Here's the function I'm using (I'm also using an ISERROR statement to
avoid N/A# errors from appearing)...what am I doing wrong?

=IF(ISERROR(VLOOKUP(C8,'Worksheet1'!$B$11:$M$150,4,FALSE)+VLOOKUP(C8,'Worksheet2'!$B$11:$M$150,4,FALSE)),"",(VLOOKUP(C8,'Worksheet1'!$B$11:$M$150,4,FALSE)+VLOOKUP(C8,'Worksheet2'!$B$11:$M$150,4,FALSE)))

Thanks for any help anyone can offer
 
B

bj

unless both worksheet one and worksheet 2 have a match your equation will
classify the reulst as an erron
tr
=IF(ISERROR(VLOOKUP(C8,'Worksheet1'!$B$11:$M$150,4,FALSE)),if(iserror(VLOOKUP(C8,'Worksheet2'!$B$11:$M$150,4,FALSE)),"",VLOOKUP(C8,'Worksheet2'!$B$11:$M$150,4,FALSE)),(VLOOKUP(C8,'Worksheet1'!$B$11:$M$150,4,FALSE))
 
B

bj

Duke's response is better. Mine will only give you the value from one sheet
with the priority the first sheet.
 
W

Wendy

Thank you so much for your fast reply ... I copied this into my real
spreadsheet application and it works wonderfully! What a great group this is
- especially for a first time user, like me.
 

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