Summing values of corresponding columns

L

lanceg

How can I retrieve the sum of only the values in column B, in which th
corresponding value in column A is equal some "search value"
specify?

Example table
_A_|_B_
1 | 20
2 | 24
3 | 21
2 | 45
1 | 67
3 | 32
2 | 10
1 | 26

Desired answer if "search value" is 1: the sum of 20, 67, 26 ... whic
is 113

I've been able to retrieve the first value, using VLOOKUP. But, I nee
to somehow imbed the VLOOKUP function inside another function tha
returns all the values - at least thats how I envision it.

Any help would be greatly appreciated. Thank you,
Lance
 
K

K.S.Warrier

hi,
pl create a third column C and put the formula in C1 =if(A1=1,B1,0)
similarly in C2 =if(A2=1,B2,0) ; .....The sum of colum C will give you the
desired result.
K.S.Warrier
 

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