View Single Post
  #7   Report Post  
Roger Govier
 
Posts: n/a
Default

Hi Vipa

You could try
=SUMPRODUCT(--(Left('Imported
Data'!$A$2:$A$30000,2)="12"),--(MONTH('Imported
Data'!$I$2:$I$30000)=H5),--(YEAR('Imported Data'!$I$2:$I$30000)=J5))

--
Regards

Roger Govier


"vipa2000" wrote in message
...
i have found when i use the below code (the shortened version for error
trapping) that it returns 0. I don't understand why. H5 and j5 do work as
they are used by other formula. Will sum product find data in the form of
120260?

=SUMPRODUCT(--('Imported Data'!$A$2:$A$30000="12"),--(MONTH('Imported
Data'!$I$2:$I$30000)=H5),--(YEAR('Imported Data'!$I$2:$I$30000)=J5))
--
Regards vipa


"vipa2000" wrote:

I have he following code. i want to count all the 12's in columnA range
2-30000 on a month picked in cell H5 and a year J5 and then deduct those
records where priority = 6 and month =h5 and year =j5. Just cannot get
the
thing to work. i am sure it is the brackets.

=SUMPRODUCT(--('Imported Data'!$A$2:$A$30000="12*"),--(MONTH('Imported
Data'!$I$2:$I$30000)=H5),--(YEAR('Imported
Data'!$I$2:$I$30000)=J5)-SUMPRODUCT(--('Imported
Data'!$C$2:$C$30000=6),--(MONTH('Imported
Data'!$I$2:$I$30000)=H5),--(YEAR('Imported Data'!$I$2:$I$30000)=J5)))

thanks in advance
--
Regards vipa