Formula that has sum and exception

Excelnovice13

New Member
Joined
Jun 9, 2024
Messages
5
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
Platform
  1. Windows
Back with another question please

In example below how do I create a formula for row 9 ( total of all) that does the following
Sums row 4 and 8 and if both are numbers gives that values but if either is zero the total of all is zero



Row 1 — 2
Row 2– 1
Row 3—1
Row 4 Total. 4
Row 5 — auto fail
Row 6—3
Row 7– 1
Row 8 Total - 0


Row 9 Total of all =0


Thanks
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
I would not recommend doing this work this way.
Having Data mixed up with calculations like this is a recipe for confusion and eventual errors.
But, this is an answer for your question:
Book1
AB
1
2Ans15
3Ans22
4Ans310
5Q1 Total17
6Ans15
7Ans2Auto Fail
8Ans310
9Q2 Total0
10Final Total0
Sheet6
Cell Formulas
RangeFormula
B5,B9B5=IF(ISNUMBER(MATCH("Auto Fail",B2:B4,0)),0,SUM(B2:B4))
B7B7="Auto Fail"
B10B10=MIN(B5,B9,B5+B9)
 
Upvote 0
In which circumstances row 4 and 8 are not numbers?
They would be numbers always it’s just that sometimes it will be a zero if one of the answers to the questions is auto fail.

That’s why I was looking for a formula where if a row equals zero that the total sum defaults to zero
 
Upvote 0
Try this.
Excel Formula:
=AND(A4<>0,A8<>0)*SUM(A4,A8)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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