View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jeffrey jeffrey is offline
external usenet poster
 
Posts: 8
Default Sum of squares if condition

I am also trying to count cells where Column B is not null AND the
adjacent value in Column A is 1.

In the following example, I would like a count of 2.
A B
1 3214
2 23190
1
1 9876
2 6789

I tried using COUNTIFS(A:A,1,B:B,ISNUMBER(B:B)), but that returns
zero.

Jeff


On Jul 21, 3:52*pm, "Jim Cone" wrote:
=SUMPRODUCT(--(A1:A4=1),(B1:B4)^2)
--
Jim Cone
Portland, Oregon USAhttp://excelusergroup.org/media/
(Formats & Styles xl add-in: *lists/removes unused styles & number formats)

"jeffrey"
wrote in ...

I want to perform a sum of squares with conditions. *I know there is a
SUMSQ function and a SUMIF function, but is there a SUMSQIF function?


I have a table like:
ColA * *ColB
1 * * 3435
2 * * 45345
2 * * 230
1 * * 9685


I want to sum the squares of ColB, if ColA=1


Jeff