How do I get excel to do the equivalent of this...

  • Thread starter Thread starter chrisjleu
  • Start date Start date
C

chrisjleu

How do i get excel to do the equivalent of this:

Here's a fragment of my spreadsheet:

Expense Code Amount
1 £10.00
2 £50.00
1 £10.00
3 £80.30
1 £10.00
2 £15.00
1 £100.00
1 £12.00

I want to sum all the values where expense code = x

I thought I might use VLOOKUP and SUM but it doesn't appear to be
working. Can anyone help?

Thanks.
 
With the code in column A and the price in column B
=SUMPRODUCT((A1:A1000=1)*(B1:B1000))
Regards,
 
Back
Top