shopping list worksheet function

  • Thread starter Thread starter cs
  • Start date Start date
C

cs

Hi,

Given a grocery store price list (=A1:B7):

ITEM: PRICE:
Apple $0.33
Honey $2.25
Bread $1.13
Eggs $1.35
Steak $2.25
Syrup $1.30

and my shopping list (=A11:B13):

ITEM: QUANTITY:
Steak 2
Eggs 3



.... I'm trying to calculate the bill ($8.55) in a
single cell using an {=array function}. I can't
get {sumproduct} to work due to the different
number of rows in the two lists. Any ideas?


Thanks in advance!

-Carl
 
Put your shopping list like
Apple $0.33
Honey $2.25
Bread $1.13
Eggs $1.35 3
Steak $2.25 2
Syrup $1.30

and use
=SUMPRODUCT(C10:C15,D10:D15)
 
Thanks for the suggestion, but the first table
really has over 3000 rows. I'd like to avoid
'combining' the tables for this and other
reasons.

So is there a way to calculate a total, keeping
both tables separate?

-CS
 
Provided that the data in A1:B7 is sorted (in ascending order) on column A,
you can have:

=SUMPRODUCT(LOOKUP(A12:A13,A2:B7),B12:B13)
 
Back
Top