I am using Excel 2003 and would like to avoid using VBA code if possible.
I have two columns (A & B) with 12 cells used, and a cell further down (C22)
where the sum of Column B is added up.
What I need to do is have Column A have either Yes Or No (I know I can do
this with a list). The trick is that in cell C22 (The Sum) I need it to only
add the data in Column B IF the corresponding cell in Column A has "Yes".
I know there has to be a way to do this! It's driving me batty! Please help!
Thank You!
Try this:
=SUMIF(A1:A12,"Yes",B1:B12)

Signature
HTH,
RD
---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
> I am using Excel 2003 and would like to avoid using VBA code if possible.
>
[quoted text clipped - 7 lines]
> I know there has to be a way to do this! It's driving me batty! Please help!
> Thank You!
GoodTrouble - 07 Oct 2007 19:11 GMT
I had to make some modifications to that to fit a criteria I forgot to
include, but you answer was the basis to my now well working formula :D Thank
You!
> Try this:
>
[quoted text clipped - 14 lines]
> help!
> > Thank You!
Ragdyer - 08 Oct 2007 01:14 GMT
You're welcome, and thanks for the feed-back.

Signature
Regards,
RD
---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
> I had to make some modifications to that to fit a criteria I forgot to
> include, but you answer was the basis to my now well working formula :D Thank
[quoted text clipped - 22 lines]
> > help!
> > > Thank You!
Sun, 7 Oct 2007 10:26:01 -0700 from GoodTrouble
<GoodTrouble@discussions.microsoft.com>:
> I am using Excel 2003 and would like to avoid using VBA code if possible.
>
[quoted text clipped - 4 lines]
> this with a list). The trick is that in cell C22 (The Sum) I need it to only
> add the data in Column B IF the corresponding cell in Column A has "Yes".
SUMPRODUCT is your friend.
=SUMPRODUCT(--(A1:A12="Yes"),(B1:B12))
See this excellent page by Bob Phillips:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

Signature
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"If there's one thing I know, it's men. I ought to: it's
been my life work." -- Marie Dressler, in /Dinner at Eight/