Solved

Excel sum using If

Posted on 2015-02-04
6
31 Views
Last Modified: 2015-03-03
Hi,

I have 2 colums

A       B
Y        £15.00
Y        £20.00
-         £ -
Y        £30.00

I want to Sum total of B only if A has Y in it

Please help

Thanks

R8VI
0
Comment
Question by:R8VI
6 Comments
 
LVL 31

Accepted Solution

by:
Rob Henson earned 500 total points
Comment Utility
Thats easy with SUMIF function:

=SUMIF(A1:A5,"Y",B1:B5)

This says look at range A1:A5 and where it finds "Y", include the relevant row from B1:B5.

if you find that you will need more than one criteria, there is also SUMIFS function which allows multiple criteria but would cover that separately if you so required.

Thanks
Rob H
0
 
LVL 31

Expert Comment

by:Rob Henson
Comment Utility
In your sample above, the result of SUM(B1:B5) will be the same as the SUMIF because the row without the Y has zero anyway.

Thanks
Rob H
0
 
LVL 25

Expert Comment

by:ProfessorJimJam
Comment Utility
see attached file.
Book1.xlsb
0
 
LVL 24

Expert Comment

by:SunBow
Comment Utility
I agree, although I often cannot see so good...

=SUMIF(A1:A4,"Y",B1:B4)
or
=SUMPRODUCT(1*($A$2:$A$5="Y")*($B$2:$B$5))
0
 
LVL 45

Expert Comment

by:Martin Liss
Comment Utility
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
My experience with Windows 10 over a one year period and suggestions for smooth operation
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now