Sumif multiple conditions

bloodybrit90

Board Regular
Joined
Jul 18, 2011
Messages
111
Hi all,

I am trying to sum C2:C15, but exclude "#N/A" and blank cells. Here is what I have that works for NA.
=SUMIF(D2:D15,"<>#n/a")

I thought:

=SUM(IF(D2:D15,"<>#n/a")*(D2:D15,"")) would state not to count or blank cells but the equation does not work.

Any suggestions??
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Excel Workbook
ABCD
1
23
3
41
52
6
7#N/A
8
91
102
113
12
13#N/A
14
15
16
17
1812<< Does this work for you?
Sheet1
Excel 2007
Cell Formulas
RangeFormula
C7=NA()
C13=NA()
C18=SUMIF(C2:C15,"<>#N/A")
 
Upvote 0
That is the formula I am currently using. I need excel to ignore the "-" which excel generates when the formula does not result in a number.

currently the cell with "-" has a formula that finds the item # and then multiplies the price from 1 vendor by the quantity that is required. If a vendor does not stock this item the price is $0, which results in "-" as the number.

Does that explanation help?
 
Upvote 0
I'm guessing a cell that results in "displaying" the "-" is actually a Zero-Value (number). Th current formatting of the cell is displaying the "-", versus its real VALUE of 0 (zero).
 
Upvote 0
Thanks, I didn't notice the formatting :eeek:. how would i conditional format to ignore $0.00? =MIN(if($C4:$G4)"<>0")
 
Upvote 0
When I use the Sum() anything, it by-passes the 0's. I'm not understanding your problem with the "-"'s (which are zero values), obviously.
 
Upvote 0
As shown below when the formula generates a 0 the conditional formatting highlights it. if you delete the 0 then the conditional formatting works. (The formula will show 0 if a vendor does not stock an item). The sum if (the last row) then calculates the total cost for an order and then highlights the lowest value. I want excel not to sum a column if a zero exists, so if a vendor does not stock an item it will not show up as the cheapest place to purchase from.

<table border="0" cellpadding="0" cellspacing="0" width="624"><col style="width: 122pt;" width="163"> <col style="width: 84pt;" width="112"> <col style="width: 81pt;" width="108"> <col style="width: 88pt;" width="117"> <col style="width: 93pt;" width="124"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl71" style="height: 15pt; width: 122pt;" width="163" height="20">$948.88 </td> <td class="xl71" style="border-left: medium none; width: 84pt;" width="112">$948.00 </td> <td class="xl71" style="background: none repeat scroll 0% 0% yellow;" width="108">$940.00 </td> <td class="xl71" style="border-left: medium none; width: 88pt;" width="117">$942.00 </td> <td class="xl71" style="border-left: medium none; width: 93pt;" width="124">$944.45 </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl71" style="height: 15pt; border-top: medium none;" height="20">$163.25 </td> <td class="xl71" style="background: none repeat scroll 0% 0% yellow;">$161.84 </td> <td class="xl71" style="border-top: medium none; border-left: medium none;">$164.80 </td> <td class="xl71" style="border-top: medium none; border-left: medium none;">$163.00 </td> <td class="xl71" style="border-top: medium none; border-left: medium none;">$165.24 </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl71" style="height: 15pt; border-top: medium none;" height="20">$1,364.85 </td> <td class="xl71" style="border-top: medium none; border-left: medium none;">$1,410.00 </td> <td class="xl71" style="border-top: medium none; border-left: medium none;">$1,365.00 </td> <td class="xl71" style="border-top: medium none; border-left: medium none;">$1,385.00 </td> <td class="xl71" style="background: none repeat scroll 0% 0% yellow;">$0.00 </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl71" style="height: 15pt; border-top: medium none;" height="20">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl71" style="height: 15pt; border-top: medium none;" height="20">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl71" style="height: 15pt; border-top: medium none;" height="20">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl71" style="height: 15pt; border-top: medium none;" height="20">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl71" style="height: 15pt; border-top: medium none;" height="20">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl71" style="height: 15pt; border-top: medium none;" height="20">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl71" style="height: 15pt; border-top: medium none;" height="20">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl71" style="height: 15pt; border-top: medium none;" height="20">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl71" style="height: 15pt; border-top: medium none;" height="20">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl71" style="height: 15pt; border-top: medium none;" height="20">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl71" style="height: 15pt; border-top: medium none;" height="20">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">#N/A</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl71" style="height: 15pt; border-top: medium none;" height="20">$2,476.98 </td> <td class="xl71" style="border-top: medium none; border-left: medium none;">$2,519.84 </td> <td class="xl71" style="border-top: medium none; border-left: medium none;">$2,469.80 </td> <td class="xl71" style="border-top: medium none; border-left: medium none;">$2,490.00 </td> <td class="xl71" style="background: none repeat scroll 0% 0% yellow;">$1,109.69 </td> </tr> </tbody></table>
 
Upvote 0
It worked well enough. The conditional formatting still highlights the $0.00, but I can just delete it and than everything works. Thanks for all the help.
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,812
Members
452,945
Latest member
Bib195

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