A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Summing one column based on date in another column



 
 
Thread Tools Display Modes
  #1  
Old December 30th, 2005, 07:09 PM posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: n/a
Default Summing one column based on date in another column

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.
  #2  
Old December 30th, 2005, 07:41 PM posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: n/a
Default Summing one column based on date in another column

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

"excel guru i'm not" wrote:

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.

  #3  
Old December 30th, 2005, 07:52 PM posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: n/a
Default Summing one column based on date in another column

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.

"Elkar" wrote:

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

"excel guru i'm not" wrote:

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.

  #4  
Old December 30th, 2005, 08:00 PM posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: n/a
Default Summing one column based on date in another column

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



"Elkar" wrote:

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

"excel guru i'm not" wrote:

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.

  #5  
Old December 30th, 2005, 08:15 PM posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: n/a
Default Summing one column based on date in another column

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?

"Elkar" wrote:

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

"excel guru i'm not" wrote:

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.

  #6  
Old December 30th, 2005, 08:26 PM posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: n/a
Default Summing one column based on date in another column

Ah, yes, that would be a problem when searching for January since a blank
cell assumes month 1.

Try this:

=SUMPRODUCT(D18,--(MONTH(A1:A8)=1),--(A1:A8""))

This will add the additional condition of not being blank.

HTH,
Elkar

"excel guru i''m not" wrote:

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?

"Elkar" wrote:

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

"excel guru i'm not" wrote:

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.

  #7  
Old December 30th, 2005, 08:36 PM posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: n/a
Default Summing one column based on date in another column

That works perfect. Thanks again!

"Elkar" wrote:

Ah, yes, that would be a problem when searching for January since a blank
cell assumes month 1.

Try this:

=SUMPRODUCT(D18,--(MONTH(A1:A8)=1),--(A1:A8""))

This will add the additional condition of not being blank.

HTH,
Elkar

"excel guru i''m not" wrote:

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?

"Elkar" wrote:

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

"excel guru i'm not" wrote:

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.

  #8  
Old December 30th, 2005, 08:39 PM posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: n/a
Default Summing one column based on date in another column

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.

"Elkar" wrote:

Ah, yes, that would be a problem when searching for January since a blank
cell assumes month 1.

Try this:

=SUMPRODUCT(D18,--(MONTH(A1:A8)=1),--(A1:A8""))

This will add the additional condition of not being blank.

HTH,
Elkar

"excel guru i''m not" wrote:

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?

"Elkar" wrote:

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

"excel guru i'm not" wrote:

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.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
creating a bar graph Johnfli General Discussion 0 October 26th, 2005 08:16 PM
Copy Cat Ain't Working shep Setting Up & Running Reports 15 September 12th, 2005 05:14 PM
Query for 'confirmation' rogge Running & Setting Up Queries 8 April 19th, 2005 03:26 PM
Adding a column based on greater than a date Toni G. Worksheet Functions 4 March 17th, 2005 08:06 PM
Summing columns based on a date range Marshall.tway Worksheet Functions 2 May 29th, 2004 02:04 PM


All times are GMT +1. The time now is 09:25 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.