Kelvs
Kelvs

Reputation: 107

Excel VLOOKUP w/ SUM function

I was wondering if it is possible to combine VLOOKUP with SUM function in Excel. I'm stuck now for awhile, here's my recent code:

=IF(COUNTIF('Supplies IN'!A3:A23,"MOSQUITO NET")>1,SUM(VLOOKUP("MOSQUITO NET",Table1,12,FALSE)))

However, it does not work.

What I would like to happen is that, on my "Supplies IN" sheet, I would like to get all the records for my "Mosquito net" and then add all their quantity. What's happening now is that the result only shows the first match it can find.

This is what I would like to happen:

ROW1: Mosquito net 500pcs
ROW2: Mosquito net 200pcs

Result (on a different Sheet): Mosquito net 800pcs

Hope someone can guide me on the right direction.

Thank you!

Upvotes: 0

Views: 116

Answers (1)

sn152
sn152

Reputation: 276

Try this formula =SUMIF('Supplies IN'!A3:A23,"Mosquito Net",B3:B23)

Upvotes: 1

Related Questions