Excel Lookup a separate table and return the sum of a product code

%3CLINGO-SUB%20id%3D%22lingo-sub-1992820%22%20slang%3D%22en-US%22%3EExcel%20Lookup%20a%20separate%20table%20and%20return%20the%20sum%20of%20a%20product%20code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1992820%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20is%20it%20possible%20to%20have%20an%20excel%20sheet%20with%202%20tabs.%26nbsp%3B%20The%20first%20tab%20has%20rows%20of%20data%20containing%20a%20list%20of%20codes%20and%20amounts%2C%20for%20example%3C%2FP%3E%3CP%3EDate%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Code%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BSupplier%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BAmount%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOn%20the%20second%20tab%20I%20want%20to%20put%20the%20code%20and%20the%20sum%20of%20the%20amounts%3B%20for%20example%3C%2FP%3E%3CP%3ECode%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Total%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20this%20possible%20by%20using%20a%20lookup%20function%20-%20I've%20attached%20the%20file%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1992820%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1993324%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Lookup%20a%20separate%20table%20and%20return%20the%20sum%20of%20a%20product%20code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1993324%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F903585%22%20target%3D%22_blank%22%3E%40Sharon_Murphy%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20the%20formula%20you%20want%3A%3C%2FP%3E%3CP%3E%3DSUMPRODUCT(--(Data!B%3AB%3DA2)%2CData!D%3AD)%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Hi is it possible to have an excel sheet with 2 tabs.  The first tab has rows of data containing a list of codes and amounts, for example

Date            Code           Supplier               Amount

 

On the second tab I want to put the code and the sum of the amounts; for example

Code                            Total

 

Is this possible by using a lookup function - I've attached the file

1 Reply

@Sharon_Murphy 

 

This is the formula you want:

=SUMPRODUCT(--(Data!B:B=A2),Data!D:D)