1
I am trying to remove inactive print queues from a print server. Each printer has a separate queue for each tray. The catch is that I only want to remove queues which have no activity on any of its corresponding trays.
For example:
Column A Column B Column C Column D
Queue Name Host Name Page Count Inactive?
Printer1Tray1 printer01 1000 FALSE
Printer2Tray1 printer02 2000 FALSE
Printer2Tray2 printer02 0 FALSE
Printer3Tray1 printer03 0 TRUE
Printer3Tray2 printer03 0 TRUE
From this example, I need Column D to show a true/false statement that all queues with a given host name have a page count of 0. The result would be TRUE for queues with the host name printer03, as they both have a page count of 0. The statement would be false for queues with host names printer01 or printer02, as the page count is greater than 0 for at least one related queue.
I realize that putting this into words is difficult (at least for me). Please let me know if I can explain any better.
Thank you all in advance!
1You never need to say
=IF(
something
, TRUE, FALSE)
in Excel; just say=
something
. Likewise,=IF(
something
, FALSE, TRUE)
is just as bad; all you need is=NOT(
something
)
— in this case,=NOT(SUMIF($B:$B, B2, $C:$C)>0)
. But you can usually simplify that even further; in this case, to=SUMIF($B:$B, B2, $C:$C)=0
. – Scott – 2017-12-23T18:27:31.410