Link to home
Start Free TrialLog in
Avatar of Andreamary
Andreamary

asked on

Counting # of WOs in Excel meeting specific criteria

I need a formula for Column F of attached sample spreadsheet based on the following conditions:

If following conditions are met:
Col A is not blank, and the number is unique (format of number is always "yyyy-#######")
Col B does not contain the text string "amd" or "AMD"
Col D is not blank
Col E is not blank, and does not contain "N/A"

Then:
Column F (COUNT_WO) = 1

If the above conditions are not met, then:
Column F (COUNT_WO) = 0

If error, then:
Column F (COUNT_WO) = blank

Thanks!
Andrea
EE_Summary_Count_WOs.xlsx
Avatar of NBVC
NBVC
Flag of Canada image

Does this work?

=IFERROR(IF(AND(A2<>"",COUNTIF($A$2:$A$13,A2)=1,ISERROR(SEARCH("amd",B2)),D2<>"",E2<>"",ISERROR(SEARCH("N/A",E2))),1,0),"")
ASKER CERTIFIED SOLUTION
Avatar of Glenn Ray
Glenn Ray
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Andreamary
Andreamary

ASKER

Hi Glenn,

Yes, you're right - only the first occurrence of the WO# is considered unique. Your formula works perfectly...thank you!

NBVC - your formula didn't work correctly in all instances but thanks for offering a solution.

Cheers,
Andrea
Where there are multiple occurrences of an item in an ID/Reference field I often find it is easier to summarise the data in a Pivot Table. The pivot then gives only row per ID.

If you don't have numbers to summarise, you can use one of the text fields as a Value field and it will apply a count to that field.

You can then use Filters on the Pivot to include/exclude certain values.
Thanks, Rob, for the tip....

Andrea