View Single Post
  #21   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kadoles Kadoles is offline
external usenet poster
 
Posts: 1
Default How do I set up a formula to add column a if column b = cell c

i did it like this

data
A B C(hidden column)
Jan 1 $5 =month(a1)
Jan 2 $5 =month(a2)
Feb 1 $10 =month(a3)
Feb 2 $10 =month(a4)
Mar 1 $20 =month(a5)
Mar 2 $20 =month(a6)

Jan Total
=sumif(C:C,1,B:B)
Feb Total
=sumif(C:C,2,B:B)
Mar Total
=sumif(C:C,3,B:B)

Hope that helps

----------
John

"Ireland" wrote in message
...
Hi,

I have a question sort of similar.

I am trying to imput a formula that will sum colum c if colum B is in a
certain date range. i.e. if dates are in january sum colum c ete.

Can someone help

Ireland

"Roger Govier" wrote:

Sorry Michelle

Typo, ran amok with typing A1 last time!!!
=IF(B1=C1,SUMPRODUCT(--($A$1:$A1=B1),$A$1:$A1),0)

--
Regards

Roger Govier


"michelle" wrote in message
...
That created a circular reference. Thanks for trying though.

"Roger Govier" wrote:

Hi Michelle

Try
=IF(B1=C1,SUMPRODUCT(--($A$1:$A1=B1),$A$1:$A1A1),0)
change the range to suit

--
Regards

Roger Govier


"michelle" wrote in message
...
a b c d
1 .2 yes yes .3
2 .5 no no .5
3 .1 yes maybe 0

So, as in the above example, I need to put a formula in D1 so that
it
will
take the sum of column a if column b = c1. I hope this makes
sense.
And
keep in mind I will be continually adding rows to this and will
need
it to
cover the entire row, not just part of a row.

Thank you in advance and let me know if you need more
clarification.