View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Scott
 
Posts: n/a
Default sumProduct (gimme a 1 if this is true, gimme the value) what i

This is the exact code I am using:
=(SUMPRODUCT(--(DATA!$C$2:$C$1500=98366),
--(DATA!$AB$2:$AB$1500))+SUMPRODUCT(--(DATA!$C$2:$C$1500=98367),
--(DATA!$AB$2:$AB$1500)))/$B$417
--
Scott Miller
University of Washington
Chemistry


"Max" wrote:

As it is, think your formula should work. If it's somehow not returning the
correct sums (or zeros), then the problem could be either that the (some)
zip codes in col C are text numbers, and / or that (some) numbers within the
col to be summed, col AB, are text numbers

One way is to try instead:

=SUMPRODUCT(--(TEXT(Data!$C$2:$C$1500,"00000")="98366"), --Data!$AB$2:$AB$15
00)

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Scott" wrote in message
...
SUMPRODUCT(--(DATA!$C$2:$C$1500=98366), DATA!$AB$2:$AB$1500)

This is what I have been trying to use. What I am doing is looking for a
specific zip code in one column when I find it I want the value of another
column to be added to a total.

Scott Miller
University of Washington
Chemistry