View Single Post
  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Here's an abbreviated version that will do what you want:

=SUMPRODUCT(--(RIGHT(B2:B251,4)={"-vss","nggf"}))

Just replace your "IF's" with what I have above.

Biff

"pomalley" wrote in message
...
I'm trying to count the number of products in column B for only those that
contain the characters "vss" or "nggf" which apprear at the end of the
product name. The products are listed as toy-vss, toy-nggf, and toy-ita.
It
appears that the formula below works, but only looks at the "vss" query
and
ignores the "nggf" query. Is there a way to combine the query so if "vss"
or
"nggf" are in Column B, it will count those products and give me the total
number of occurences? I'm thinking combining the names in a string, but
have
not been successful in combining them.

=SUMPRODUCT
(--IF((RIGHT('[TDS Wkly Rpt 2005.xls]2005 Data'!$B$2:$B$251,3)="VSS"),
--IF((RIGHT('[TDS Wkly Rpt 2005.xls]2005 Data'!$B$2:$B$251,4)="NGGF"),
--(DATE(YEAR('[TDS Wkly Rpt 2005.xls]2005 Data'!$A$2:$A$251),MONTH('[TDS
Wkly Rpt 2005.xls]2005 Data'!$A$2:$A$251),1)=$FX$3),
--(LEFT('[TDS Wkly Rpt 2005.xls]2005 Data'!$AA$2:$AA$251,5)="Other"))))