Excel: Identify Cells with Duplicate Value in One Cell, and Equals 0 in the Next Cell

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!

DonVonCount

Posted 2017-12-10T16:15:12.170

Reputation: 13

Answers

1

The formula to use in column D (D3) would be:
=IF(SUMIF($B:$B, B3, $C:$C)>0,FALSE,TRUE)

You SUM the number in column C IF coulmn B matches the column-B-value of this row. And if the SUM is greater-than 0 it will say FALSE.

If you want to be able to use the formula for empty rows and it should only be populated if there's something at all in the rows before it, then you can use:
=IF(SUMIF($B:$B, B2, $C:$C)>0,FALSE,IF(B2="","",TRUE))

Here is a working file with the given formula: https://1drv.ms/x/s!Ao8EzDmtlA0JhnHYC5qAtgxgK3Q6

Yisroel Tech

Posted 2017-12-10T16:15:12.170

Reputation: 4 307

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