Formula to Count Rows Meeting Multiple Criteria

powelly04

New Member
Joined
Jan 28, 2015
Messages
14
Hi, Need help with a formula been googleing all day and tried many different formulas but getting no where so now looking for assistance Below is test data for the purpose of this example.

I need to count all rows that have complete install and app. all 3 criteria need to be variable tho and be sleeted from a drop down list on my report page. the formula page will then do the magic and then the report page will format the data nicely in rank.

Below is test data for the purpose of an example.

Formula i am using is: =SUMPRODUCT((COUNTIF(INDIRECT("'"&Report!$a$2&"'!$G:$G"), "=complete")),(COUNTIF(INDIRECT("'"&Report!$a$2&"'!$C:$C"), Report!$a2)))

Sheet 1

ABCDEFG
DateTimeHostnameAppJobTypeReturnCodeComment
2014-03-0701:00:00ComputerAXInstall0COMPLETE
2014-03-0703:00:00ComputerBXInstall0COMPLETE
2014-03-0709:00:00ComputerCYExtract128Unzip



<tbody>
</tbody>















Sheet 2

ABCDEFG
DateTimeHostnameAppJobTypeReturnCodeComment
2014-03-0701:00:00ComputerAXInstall0COMPLETE
2014-03-0701:05:00ComputerAXInstall0COMPLETE
2014-03-0701:00:00ComputerBYExtract0COMPLETE


<tbody>
</tbody>















Formulas

A
=SUMPRODUCT((COUNTIF(INDIRECT("'"&Report!$a$2&"'!$G:$G"), "=complete")),(COUNTIF(INDIRECT("'"&Report!$a$2&"'!$C:$C"), Report!$a2)))


Report

A
Sheet 1 "this is a drop down box to allow the user of the report to select which sheet to look
Comment "again drop down list of COMPLETE / NOT STARTED / IN PROCESS"

Results
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Yeah :(, i messed up the example sorry.

Report sheey cell A2 will be a drop down list of computers (ComputerA, CompupterB, etc...)

I want the formula to return all data using the values of the drop down list as the criteria
 
Upvote 0
Yeah :(, i messed up the example sorry.

Report sheey cell A2 will be a drop down list of computers (ComputerA, CompupterB, etc...)

I want the formula to return all data using the values of the drop down list as the criteria

You have just two data sheets: Sheet1 and Sheet2. Right?

In the Report sheet, you have a cell where the user selects or enters either Sheet1 or Sheet2. Right?

Column G of the target data sheet must equal "complete". Right?

Must column C of the target sheet also meet some condition? If so, what condition?
 
Upvote 0
You have just two data sheets: Sheet1 and Sheet2. Right?

for the example yes but on my actual worksheet these tabs are the names of the month and their are more then 2 in my work sheet. 12 in total

In the Report sheet, you have a cell where the user selects or enters either Sheet1 or Sheet2. Right?
Yes, they have an option of 12 for the dates of the month

Column G of the target data sheet must equal "complete". Right?
Yes

Must column C of the target sheet also meet some condition? If so, what condition?
computer name "ComputerA"
 
Upvote 0
Try...

Code:
[FONT=Lucida Console]
[SIZE=2]
=COUNTIFS(INDIRECT("'"&Report!A2&"'!G:G"),"complete",
   INDIRECT("'"&Report!A2&"'!C:C","computerA")
[/SIZE][/FONT]
 
Upvote 0
Excel gives me an error with the brackets and no matter what i do to fix it i still get an error.

I got to this- =COUNTIF(INDIRECT("'"&Report!$F$3&"'!$F:$F"),$T4)*(COUNTIF(INDIRECT("'"&Report!$F$3&"'!$C:$C"),V$2))

but it finds the value of each part then multiplies the first (1) by the second (31) and gives me the answer of 62 using my own test data. T4 = Complete & V2 = Computer A

the answer it should give is 1 as only 1 row meets both requirements.
 
Last edited:
Upvote 0
Excel gives me an error with the brackets and no matter what i do to fix it i still get an error.

I got to this- =COUNTIF(INDIRECT("'"&Report!$F$3&"'!$F:$F"),$T4)*(COUNTIF(INDIRECT("'"&Report!$F$3&"'!$C:$C"),V$2))

but it finds the value of each part then multiplies the first (1) by the second (31) and gives me the answer of 62 using my own test data. T4 = Complete & V2 = Computer A

the answer it should give is 1 as only 1 row meets both requirements.

Where must this formula go, in B2 of Report perhaps?
 
Upvote 0
on my formula page. > I will then use another formula to rank them in order. > And then on my report it will then arrange the rank and display them in order.

I can do the 2nd 2 parts with ease just cant get the numbers im after to then be able to sort them.
 
Upvote 0
=COUNTIFS(G:G,"Complete", C:C,"computera") - that would work if the data and formula was in the same sheet but when it becomes a 3d formula a countif does not support it :(
 
Upvote 0

Forum statistics

Threads
1,215,140
Messages
6,123,270
Members
449,093
Latest member
Vincent Khandagale

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