# Devide two "SUM.IF" formulas

#### Scarface

##### New Member
Situation:

Sheet A: Dates in cells A2:A1000
Sheet A: Actions in cells B2:B1000
Sheet A: Error in cells C2:C1000

Sheet B: Date1 in cell D1
Sheet B: Date2 in cell E1

I would like to calculate an error percentage of actions if the dates are between the two dates in Sheet B, D1 and E1.

I tried the following formula, but without succes

=SUM.IF(Sheet A!A2:A1000 >= D1;Sheet A!A2:A1000 <= E1;Sheet A!C2:C1000)/Sheet A!A2:A1000 >= D1;Sheet A!A2:A1000 <= E1;Sheet A!C2:C1000)

### Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
You haven't said what sort of data you have in columns B and C. If they are numbers try:

=SUMPRODUCT(--('Sheet A'!A2:A1000>=D1);--('Sheet A'!A2:A1000<=E1);'Sheet A'!C2:C1000)/SUMPRODUCT(--('Sheet A'!A2:A1000>=D1);--('Sheet A'!A2:A1000<=E1);'Sheet A'!B2:B1000)

You haven't said what sort of data you have in columns B and C. If they are numbers try:

=SUMPRODUCT(--('Sheet A'!A2:A1000>=D1);--('Sheet A'!A2:A1000<=E1);'Sheet A'!C2:C1000)/SUMPRODUCT(--('Sheet A'!A2:A1000>=D1);--('Sheet A'!A2:A1000<=E1);'Sheet A'!B2:B1000)
It says "#Devide/0"

Furthermore, the values in B and C are numbers

The formula worked when i tested it. It will return #DIV/O! if there are no entries between those dates. Would you like to post some sample data and the expected result?

Sorry for the delay in my reaction, but it works perfectly! Also, i added another condition:

=SOMPRODUCT(--('Sheet A!C3:C4998>=Sheet B!A38);--('Sheet A'!C3:C4998<=Sheet B!B38);--('Sheet A'!B3:B4998=Sheet B!A11);'Sheet A'!O3:O4998)/SOMPRODUCT(--('Sheet A'!C3:C4998>=Sheet B!A38);--('Sheet A'!C3:C4998<=Sheet B!B38);--('Sheet A'!B3:B4998=Sheet B!A11);'Sheet A'!N3:N4998)

Is this the correct way to do this?

Replies
1
Views
411
Replies
0
Views
660
Replies
2
Views
478
Replies
1
Views
805
Replies
8
Views
168

1,221,119
Messages
6,158,051
Members
451,459
Latest member
Austin2550

### 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.

### Which adblocker are you using?

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

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