Devide two "SUM.IF" formulas

Scarface

New Member
Joined
Feb 21, 2010
Messages
13
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)

Thanks in advance :)
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
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)
 
Upvote 0
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 :)
 
Upvote 0
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?
 
Upvote 0
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? :)
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

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