Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

using sumif function

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Using SUMIF function

Using SUMIF function

ResolvedVersion 2000

Juho has attended:
Excel VBA Intro Intermediate course

Using SUMIF function

I'm trying to use the SUMIF excel function. It works just fine in form:

=SUMIF(Total!C101:C141,">5",Total!B101:B141)

and in form

=SUMIF(Total!C101:C141,J22,Total!B101:B141)

but I cant get it working when I try to make the "bigger than" comparison with a cell reference. For example

=SUMIF(Total!C101:C141,">J22",Total!B101:B141)

returns zero even there are values in the cells and everything looks to be in order otherewise. What could be the problem?

Thanks in advance,

Juho

RE: Using SUMIF function

Hi Juho

In the SumIf function the Criteria section is taken as a string value so in the wron equation yuo are looking for all cells greater than the WORD J22 NOT the value in it.

One way to get around this is to write >5 in cell J22 and then use your second example:

=SUMIF(Total!C101:C141,J22,Total!B101:B141)

In this way J22 contains the criteria >5 and gives you the correct answer.

I have attached a little example as a demonstration.

Hope this helps

Carlos

Attached files...

SumIf Demo.xls

Mon 23 Mar 2009: Automatically marked as resolved.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Counting Blanks

Some times you want to check if there are cells missing data in your range. You can use the COUNTBLANK FUNCTION to acheive this. It is =COUNTBLANK(Range). Note Cells with formulas that return "" (empty text) are also counted. Cells with zero values are not counted.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.