Solved

Excel sum using If

Posted on 2015-02-04
6
38 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 33

Accepted Solution

by:
Rob Henson earned 500 total points
ID: 40588294
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 33

Expert Comment

by:Rob Henson
ID: 40588299
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 26

Expert Comment

by:ProfessorJimJam
ID: 40588315
see attached file.
Book1.xlsb
0
 
LVL 24

Expert Comment

by:SunBow
ID: 40588513
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 47

Expert Comment

by:Martin Liss
ID: 40641556
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 Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

735 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