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 / December 2005

Tip: Looking for answers? Try searching our database.

Summing one column based on date in another column

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
excel guru i'm not - 30 Dec 2005 19:09 GMT
I desperately need help here.  I have a spreadsheet that has sales price in
one column and the date in another column.  It will only add if the date is
the month only i.e., January vs January 1, 2005.  I need it to add by month
based on all days within the month because that column has to have the actual
date not just the month.
Elkar - 30 Dec 2005 19:41 GMT
For this example I'll assume date is in column A and amount is in column B:

If you're just interested in a specific month (january) you could use this:

=SUMPRODUCT(B1:B100,--(MONTH(A1:A100)=1))

Or, if you want to easily be able to change the month being summed, you
could place the number of the month in a seperate cell (we'll say C1 for
example) and use this:

=SUMPRODUCT(B1:B100,--(MONTH(A1:A100)=C1))

HTH,
Elkar

> I desperately need help here.  I have a spreadsheet that has sales price in
> one column and the date in another column.  It will only add if the date is
> the month only i.e., January vs January 1, 2005.  I need it to add by month
> based on all days within the month because that column has to have the actual
> date not just the month.
excel guru i''m not - 30 Dec 2005 19:52 GMT
Thank you so much for the quick reply.  I did this with the seperate column
showing January for example.  The problem is I have dozens of calculations to
do by month so I would have to add 20 or 30 columns to do this.

I am trying to get it to count january 5, 2005 and january 6, 2005 as all
being in Jan.

I'll try what you just sent me and see if it works.

> For this example I'll assume date is in column A and amount is in column B:
>
[quoted text clipped - 16 lines]
> > based on all days within the month because that column has to have the actual
> > date not just the month.
excel guru i''m not - 30 Dec 2005 20:00 GMT
Thank you!  Thank you!  Thank you!  I cannot thank you enough.  I have been
trying to figure this out for 4 days, as I didn't know this forum existed.  
You made my day:)

> For this example I'll assume date is in column A and amount is in column B:
>
[quoted text clipped - 16 lines]
> > based on all days within the month because that column has to have the actual
> > date not just the month.
excel guru i''m not - 30 Dec 2005 20:15 GMT
New problem.  When I use this formula it is counting the dollars in the date
columns that are blank.  Do you know how I would fix this?

> For this example I'll assume date is in column A and amount is in column B:
>
[quoted text clipped - 16 lines]
> > based on all days within the month because that column has to have the actual
> > date not just the month.
Elkar - 30 Dec 2005 20:26 GMT
Ah, yes, that would be a problem when searching for January since a blank
cell assumes month 1.

Try this:

=SUMPRODUCT(D1:D8,--(MONTH(A1:A8)=1),--(A1:A8<>""))

This will add the additional condition of not being blank.

HTH,
Elkar

> New problem.  When I use this formula it is counting the dollars in the date
> columns that are blank.  Do you know how I would fix this?
[quoted text clipped - 19 lines]
> > > based on all days within the month because that column has to have the actual
> > > date not just the month.
excel guru i''m not - 30 Dec 2005 20:36 GMT
That works perfect.  Thanks again!

> Ah, yes, that would be a problem when searching for January since a blank
> cell assumes month 1.
[quoted text clipped - 31 lines]
> > > > based on all days within the month because that column has to have the actual
> > > > date not just the month.
Elkar - 30 Dec 2005 20:39 GMT
Sorry, I meant to put this:

=SUMPRODUCT(B1:B100,--(MONTH(A1:A100)=1),--(A1:A100<>""))

I got some ranges mixed up with another formula I was working on.

> Ah, yes, that would be a problem when searching for January since a blank
> cell assumes month 1.
[quoted text clipped - 31 lines]
> > > > based on all days within the month because that column has to have the actual
> > > > date not just the month.
 
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.