using sumif function
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

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

Using SUMIF function

resolvedResolved · High Priority · Version 2000

replyReply Fri 27 Feb 2009, 15:58Delegate Juho said...

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

For upcoming training course dates see: Pricing & availability

replyReply Mon 16 Mar 2009, 15:25Trainer Carlos said...

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.

 

Please browse our web site to find out more about
excel+training+best and other Microsoft training courses.

Excel tip:

Quickly select a block of data

To quickly select a block of data make sure your active cell is somewhere whithin the block of data and then press Ctrl+* or Ctrl+Shift+8.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard