forestcat
forestcat

Reputation: 33

SUMIF function with criteria in another cell

Say I have to sum up the cells in column B if their corresponding cells in column A <= the value in some specific cell in column C. Instead of SUMIF(A1:A10,"<=10",B1:B10), I tried SUMIF(A1:A10,"<=C1",B1:B10) and it didn't work.

How do you fix it so that the criteria of the SUMIF function involves the value in a specific cell? I'd like to set it this way because I have to apply the SUMIF function to the entire column. Ideally, the formulae in the cells of column D will be something similar to

=SUMIF(A1:A10,"<=C1",B1:B10)


=SUMIF(A1:A10,"<=C2",B1:B10)

etc.

Upvotes: 3

Views: 9617

Answers (1)

Marcel
Marcel

Reputation: 2794

Try this:

=SUMIF($A$1:$A$10,">="&C1,$B$1:$B$10)

Put it in D1 and fill down.

Upvotes: 7

Related Questions