Solved

Counting # of WOs in Excel meeting specific criteria

Posted on 2016-10-03
5
40 Views
Last Modified: 2016-10-04
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
0
Comment
Question by:Andreamary
5 Comments
 
LVL 23

Expert Comment

by:NBVC
ID: 41827024
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),"")
0
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
ID: 41827041
It appears that if a WO# appears more than once, only the first occurrence is considered unique.  If that is true then this formula will return the results you are expecting:

F2:  =IF(AND(COUNTIF($A$2:A2,A2)=1,IFERROR(SEARCH("amd",B2),0)=0,NOT(ISBLANK(D2)),IFERROR(FIND("N/A",E2),0)=0),1,0)

See the attached file for the breakout; there are four columns to the right that show each test.

Regards,
Glenn
EE_Summary_Count_WOs-mod.xlsx
0
 

Author Comment

by:Andreamary
ID: 41827133
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
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 41827628
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.
0
 

Author Comment

by:Andreamary
ID: 41828126
Thanks, Rob, for the tip....

Andrea
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question