View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Stephen[_2_] Stephen[_2_] is offline
external usenet poster
 
Posts: 364
Default Excel 2000 - problem with a Sum If (I think)

What if A5 is not equal to 4? This formula will display nothing in that
case:
=IF(A5=4,SUM(A2:A5,"")
Adjust the range A2:A5 as needed. Is that what you want?

Or do you mean you want the sum of those cells in column B where the
adjacent column A entry is 4? If so, try
=SUMPRODUCT(--(A2:A5=4),B2:B5)

"Scoobs" wrote in message
...
Hello
Can anyone please help me.
I am trying to create a function that will sum up a column of numbers if
another cell in another column equals a particular value.

I have 2 columns with values in them - e.g.

A1 Column A Column B
A2 1 10
A3 2 20
A4 3 30
A5 4 40
etc.

example:
if A5 = 4, then add up all in coumn B

I have tried numerous things and nothing seems to work.

I would be grateful for any help that can be given.