Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula help! <> SEARCH result within SUMPRODUCT 1

Status
Not open for further replies.

knifey

Technical User
Nov 14, 2006
180
GB
Hi,
I have a sumproduct formula that matches a reporting month and year in the format mmm-yy (cell I15) to a column of dates (colH). It then counts all rows where column N contains 'Late Start' as a substring.

=SUMPRODUCT(1* (MONTH('Stats Tracker'!$H$2:$H2000)=MONTH(I15)) * (YEAR('Stats Tracker'!$H$2:$H2000)=YEAR(I15)) * (ISNUMBER(SEARCH("*Late Start*",'Stats Tracker'!$N$2:$N2000))))

This works fine, but now I need to change this to count all rows where column N does not contain 'Late Start' as a substring.
This is the closest I've got to making it work:

=SUMPRODUCT(1*(MONTH('Stats Tracker'!$H$2:$H2000)=MONTH(I15))*(YEAR('Stats Tracker'!$H$2:$H2000)=YEAR(I15))*(ISNUMBER(SEARCH("<>Late Start""",'Stats Tracker'!$N$2:$N2000))))

Can anyone advise where I'm going wrong?

Thanks,
K
 
Hi,

How about a SUMPRODUCT to count the month & year MINUS your original search value?
 
Hi Skip,
Fantastic that was just what I was looking for.

=SUMPRODUCT(1*((MONTH('Stats Tracker'!$H$2:$H2000)=MONTH(I15))*(YEAR('Stats Tracker'!$H$2:$H2000)=YEAR(I15)))-((MONTH('Stats Tracker'!$H$2:$H2000)=MONTH(I15))*(YEAR('Stats Tracker'!$H$2:$H2000)=YEAR(I15)))*(ISNUMBER(SEARCH("*Late Start*",'Stats Tracker'!$N$2:$N2000)))

Thanks,
K
P.S. I love sumproduct
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top