If three sets of multiplied cells added together equal zero then blank

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
304
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I'm trying to figure out why my IF formula doesn't work. I want the result to be a blank cell but it gives me FALSE. It is possible for any one (or all) of the multiplied cells to be blank which is why I added the IFERROR to them.

Can anyone give me a pointer?

Excel Formula:
=IF((IFERROR((J49*D49),0)+IFERROR((J50*D50),0)+(IFERROR(J51*D51,0)))=0,"")
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
What should happen if they don't total to 0?
 
Upvote 0
What should happen if they don't total to 0?
Provide whatever the results of the equation are, unless it's an error then I need to figure out why it's giving an error.
 
Upvote 0
Is this what you are after?
Excel Formula:
=IFERROR((J49*D49)+(J50*D50)+(J51*D51),"")
 
Upvote 0
Ok, how about
VBA Code:
=IF(SUMPRODUCT(D49:D51,J49:J51)=0,"",SUMPRODUCT(D49:D51,J49:J51))
 
Upvote 0
Solution
Is this what you are after?
Excel Formula:
=IFERROR((J49*D49)+(J50*D50)+(J51*D51),"")
This removes the Zero and leaves the cell blank, however it doesn't display the total when there is a value greater than zero.
 
Upvote 0
Ok, how about
VBA Code:
=IF(SUMPRODUCT(D49:D51,J49:J51)=0,"",SUMPRODUCT(D49:D51,J49:J51))
This was successfully removes the zero leaving a blank cell AND provides the sum if there is one. Thank you.
 
Upvote 0
This removes the Zero and leaves the cell blank, however it doesn't display the total when there is a value greater than zero.
It does for me in my testing.

If it is not working for you, please present an example where it is not working.
Please let us know exactly what is in each of those 6 cells being referenced in the formula.
 
Upvote 0
Glad we could help & thanks for the feedback.

Joe
For me, your formula only leaves a blank cell if the formula results in an error, it does leave a blank cell if the total is 0
 
Upvote 0
For me, your formula only leaves a blank cell if the formula results in an error, it does leave a blank cell if the total is 0
OK, I was not getting that they wanted to high the 0 result in addition to any error. I thought they were just trying to hide the errors.
I guess that is mentioned in the title, but not in the question.

This removes the Zero and leaves the cell blank, however it doesn't display the total when there is a value greater than zero.
I also was not getting that if one row returned a total, and one row returned an error, you want to ignore the errors and show the total.
 
Upvote 0

Forum statistics

Threads
1,214,914
Messages
6,122,211
Members
449,074
Latest member
cancansova

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