Help on Excel Formula using Sum and If

bemcbride

New Member
Joined
May 21, 2012
Messages
47
My spreadsheet has a list of customers and invoice amounts and a yes or no that indicates whether or not they have paid. I want to sum only the amounts that have been marked as a yes (for paid.)

I tried using the sumif function but it didn't work correctly.
My next idea was to do an imbedded if statement however when i got to the part of to sum it I got stuck.

Some help would be greatly appreciated!
 
Welcome to the Board!

If you have Excel 2007+ you can use SUMIFS:


Excel 2010
ABCDEF
1CustomerInvoice AmountPaid?CompanyTotal Paid
2ABC Imports$47.54YesABC Imports$227.89
3XYZ Co$79.53NoXYZ Co$43.55
4DEF Exports$26.91YesDEF Exports$156.91
5ABC Imports$92.77Yes
6XYZ Co$46.11No
7DEF Exports$85.76Yes
8ABC Imports$87.57Yes
9XYZ Co$5.65No
10DEF Exports$44.24Yes
11ABC Imports$45.30No
12XYZ Co$43.55Yes
13DEF Exports$67.30No
Sheet1
Cell Formulas
RangeFormula
F2=SUMIFS($B$2:$B$13,$A$2:$A$13,E2,$C$2:$C$13,"Yes")
F3=SUMIFS($B$2:$B$13,$A$2:$A$13,E3,$C$2:$C$13,"Yes")
F4=SUMIFS($B$2:$B$13,$A$2:$A$13,E4,$C$2:$C$13,"Yes")


HTH,
 
Upvote 0
Hi,

Could you post a data sample?

M.

Edit

Smitty has already provided a solution
 
Upvote 0
Try something like

=SUMPRODUCT(--(A1:A100="Shell"),--(B1:B100="yes"),C1:C100)
 
Upvote 0
SUMIF should work for you in this instance.

Here's an example for your situation:

Excel Workbook
ABC
1CustomerInv AmtPaid?
2A100Y
3B200N
4C300N
5D400Y
6E500Y
7F150Y
8G250N
9H350Y
10I450N
11J550Y
12K975N
13L875N
14M775Y
15N675N
16O575Y
17
18Total Y Paid3,400
19
20
21--------------------------------------
22
Sheet4
Excel 2010
Cell Formulas
RangeFormula
B18=SUMIF(C2:C16,"=Y",B2:B16)
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top