Formula to Count Rows Meeting Multiple Criteria, Without Duplicates

L

Legacy 276815

Guest
Greetings,

This forum has served me well several times in the past while struggling with Excel, and I'm hoping you guys can come through for me now. No matter how much searching I do for this, the solutions provided to similar problems always boggle my mind a little too much for me to successfully adapt it to my own workbook.

Essentially, I have an excel sheet that is tied to a SQL syslog view populated with the results of numerous jobs I'm deploying to computer workstations in our environment. The resulting source data looks something like:

ABCDEFG
DateTimeHostnameAppJobTypeReturnCodeComment
2014-03-0701:00:00ComputerAXInstall0COMPLETE
2014-03-0701:00:00ComputerAXInstall0COMPLETE
2014-03-0701:00:00ComputerBYExtract128Unzip

<tbody>
</tbody>









Ultimately, I would like to construct a formula that will count something like the below:
The number of rows where App is X, JobType is Install, ReturnCode is 0, and Comment is COMPLETE -- without duplicate results when the Hostname is factored in. I.E., if I re-run a job on the same computer and columns C-G are identical between the two resulting rows, I only want to count this once. In the above example data, the formula should resolve the count as 1 (and not 2).

I'd then use this formula to put together a chart showing the number of "COMPLETE" rows per App with a ReturnCode of 0 vs non-zero (among other things).

I was able to put together a COUNTIFS formula that handily takes care of the multiple criteria requirement, but leaves me completely stumped with how to drop the duplicate results in regards to columns C-G (factoring in the hostname). Any suggestions or example formulas would be GREATLY appreciated!
Current (not quite there) COUNTIFS example: =COUNTIFS(Sheet1!D:D,"X",Sheet1!E:E,"Install",Sheet1!F:F,0,Sheet1!G:G,"COMPLETE")

P.S. If I'm going about this completely backwards, alternate solutions are also totally welcome! The only requirement I was given is that the results should update in real-time as the source data grows, without requiring any user interaction from the person viewing the workbook.

If my issue comes across as confusing just let me know and I'll be happy to clarify further however necessary!
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Control+shift+enter, not just enter:
Rich (BB code):
=SUM(IF(FREQUENCY(IF(C2:C4<>"",IF(D2:D4="X",IF(E2:E4="Install",
    IF(F2:F4=0,IF(G2:G4="COMPLETE",MATCH(C2:C4,C2:C4,0)))))),
    ROW(C2:C4)-ROW(C2)+1),1))
 
Upvote 0
Control+shift+enter, not just enter:
Rich (BB code):
=SUM(IF(FREQUENCY(IF(C2:C4<>"",IF(D2:D4="X",IF(E2:E4="Install",
    IF(F2:F4=0,IF(G2:G4="COMPLETE",MATCH(C2:C4,C2:C4,0)))))),
    ROW(C2:C4)-ROW(C2)+1),1))

You're a wizard, sir. This worked beautifully! Exactly what I needed.
Thank you so much :biggrin:
 
Upvote 0

Forum statistics

Threads
1,214,970
Messages
6,122,514
Members
449,088
Latest member
RandomExceller01

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