datadummy

Active Member
Joined
Mar 16, 2017
Messages
312
Office Version
  1. 365
Platform
  1. Windows
I am attempting to calculate data from 3 tabs and its returning the incorrect %, essentially I am writing a statement that is 2 countifs the first divided by the second, here is the formula please help, I am open to a shorter formula as I'm sure I have overcomplicated mine..


=COUNTIFS(Tab1!$C:$C,">10/31/2018",Tab1!$C:$C,"<12/1/2018",Tab1!E:E,"Y",Tab2!$C:$C,">10/31/2018",Tab2!$C:$C,"<12/1/2018",Tab2!E:E,"Y",Tab3!$C:$C,">10/31/2018",Tab3!$C:$C,"<12/1/2018",Tab3!E:E,"Y")/COUNTIFS(Tab1!$C:$C,">10/31/2018",Tab1!$C:$C,"<12/1/2018",Tab1!$E:$E,"?*",Tab2!$C:$C,">10/31/2018",Tab2!$C:$C,"<12/1/2018",Tab2!$E:$E,"?*",Tab3!$C:$C,">10/31/2018",Tab3!$C:$C,"<12/1/2018",Tab3!$E:$E,"?*")
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Why do you think the formula returns an incorrect percentage? Does column E across tabs contains blanks?
 
Upvote 0
Column E doesn't contain any blanks on any tab and when each tab is calculated I get 93%,93% and 100% and then my formula/roll up of the three is returning 100%. I'm sure my equation must be off somewhere or I am calculating something incorrectly.
 
Upvote 0
Column E doesn't contain any blanks on any tab and when each tab is calculated I get 93%,93% and 100% and then my formula/roll up of the three is returning 100%. I'm sure my equation must be off somewhere or I am calculating something incorrectly.

Thus, you get 100% instead of (93%+93%+100%)/3, right?

Let's try the following shorter set up...

1. Create a range housing the names of the relevant sheets, tha is, Tab1, Tab2, and Tab3. Select this range and name it SheetList.

2. Now invoke the following formula:

=SUMPRODUCT(COUNTIFS(INDIRECT("'"&SheetList&"'!C:C"),">10/31/2018",INDIRECT("'"&SheetList&"'!C:C"),"<12/1/2018",INDIRECT("'"&SheetList&"'!E:E"),"Y"))/SUMPRODUCT(COUNTIFS(INDIRECT("'"&SheetList&"'!C:C"),">10/31/2018",INDIRECT("'"&SheetList&"'!C:C"),"<12/1/2018",INDIRECT("'"&SheetList&"'!E:E"),"?*"))

Let's compare this with:

=SUMPRODUCT(COUNTIFS(INDIRECT("'"&SheetList&"'!C:C"),">10/31/2018",INDIRECT("'"&SheetList&"'!C:C"),"<12/1/2018",INDIRECT("'"&SheetList&"'!E:E"),"Y"))/SUMPRODUCT(COUNTIFS(INDIRECT("'"&SheetList&"'!C:C"),">10/31/2018",INDIRECT("'"&SheetList&"'!C:C"),"<12/1/2018"))
 
Upvote 0

Forum statistics

Threads
1,215,365
Messages
6,124,513
Members
449,168
Latest member
CheerfulWalker

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