• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Vlookup with Sum

Diya08

New Member
Hi All,

I have Account numbers in ColumnA, Column C and their respective Total Transactions in Column B, ColumnD. I am trying to get their total transaction count based on the account number. Tried Vlookup with sum but its working eg: if A2=C2 then its summing up the values which is correct. but A5 not equals to C5 in that case it has to look for matching account number in Column C and then sum.
This is the formula I have used
=SUM(VLOOKUP($A2,$A$2:$D$16,{2,4},FALSE))

Please see the attachment.

Please help me with correct formula.

Thanks.
 

Attachments

  • Sample Data.xlsx
    10.1 KB · Views: 17
Last edited:
Basically you need 2 Vlookup and Iferror functions for multiple tables lookup & sum, something like:

In F2, formula copied down:

=SUM(IFERROR(VLOOKUP(A2,A$2:B$15,2,0),0),IFERROR(VLOOKUP(A2,C$2:D$15,2,0),0))

Regards
 
Back
Top