Solved

Counting # of WOs in Excel meeting specific criteria

Posted on 2016-10-03
5
24 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 31

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now