sumproduct or other formula?

B

bubble

i would like to be able to sum the following according to column A's value

mar 100
april 200
may 300
june 400

if i have a cell that has may, i would like another cell to add up anything
from before, example, may will be 600, april will be 300, and june will be
1000.

Thank you.
 
B

Biff

Try this:

.................A..............B..........C.........D
1...........mar.............100..................may
2...........april............200
3...........may............300
4...........june............400

D1 = some month

=SUM(B1:INDEX(B1:B4,MATCH(D1,A1:A4,0)))

Biff
 
B

bubble

Thank you!!!

Biff said:
Try this:

.................A..............B..........C.........D
1...........mar.............100..................may
2...........april............200
3...........may............300
4...........june............400

D1 = some month

=SUM(B1:INDEX(B1:B4,MATCH(D1,A1:A4,0)))

Biff
 
Top