Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / October 2007

Tip: Looking for answers? Try searching our database.

Conditional Adding

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GoodTrouble - 07 Oct 2007 18:26 GMT
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!
Ragdyer - 07 Oct 2007 18:30 GMT
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!
Stan Brown - 07 Oct 2007 21:03 GMT
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/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.