View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Luke M Luke M is offline
external usenet poster
 
Posts: 2,722
Default Sumproduct formula not working

the RIGHT function returns a text string, and you are then comparing it to a
number. One option is to place the 61006 within quotes (thus treating it like
text), like so:

=SUMPRODUCT(--(YEAR(Requisitions!$C$7:Requisitions!$C$1015)=2009 ),--((Requisitions!$H$7:$H$1015)=RIGHT(A3,5)),--(RIGHT(Requisitions!$G$7:Requisitions!$G$1015)="61 006"),Requisitions!$F$7:$F$1015)

the other option is to place the RIGHT function within a VALUE function, if
you would rather compare numbers.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Vince" wrote:

The following formula returns 0.

=SUMPRODUCT(--(YEAR(Requisitions!$C$7:Requisitions!$C$1015)=2009 ),--((Requisitions!$H$7:$H$1015)=RIGHT(A3,5)),--(RIGHT(Requisitions!$G$7:Requisitions!$G$1015)=610 06),Requisitions!$F$7:$F$1015)

C F G H

6/29/2009 $29,466.00 41-70-80801-61006 80801
6/29/2009 $2,080.00 41-70-80801-61006 80806
6/29/2009 $8,840.00 41-70-80801-61006 80801
6/30/2009 $1,061.16 41-70-80801-61006 80804
7/1/2009 $4,433.90 41-70-80801-61006 80801
7/6/2009 $20,000.00 41-70-80801-61006 80801

The following works well with the 3rd variable of column (G) not being used

=SUMPRODUCT(--(YEAR(Requisitions!$C$7:Requisitions!$C$1015)=2009 ),--((Requisitions!$H$7:$H$1015)=RIGHT(A3,5)),Requisit ions!$F$7:$F$1015)

Your help is appreciated.