Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Getting the Sum from months

I have 3 columns A-part numbers, B-Date (year, month, date) and C-quantity.
What I'm trying to figure out is how to get a Qty for Part for a month for
each month and do the same for each part. The sum would go to a cell.
ie
Part Date Qty
123 08 10/10 15
124 08 10/10 10
123 08 10/11 20


Some parts may repeatd in the same month. I have figured out how to get the
total quantity but trying to break in it down in months has me somewhat
stumped.

TIA
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Getting the Sum from months

Hi,

I'm not sure I understand but try this

=SUMPRODUCT((A2:A20=123)*(MONTH(B2:B20=1)*(C2:C20) ))

This will sum Column C if the part number is 123 and the month is 1 (Jan)

In practice I'd use cell references and have the part number and month in a
cell.

Mike



"noreaster" wrote:

I have 3 columns A-part numbers, B-Date (year, month, date) and C-quantity.
What I'm trying to figure out is how to get a Qty for Part for a month for
each month and do the same for each part. The sum would go to a cell.
ie
Part Date Qty
123 08 10/10 15
124 08 10/10 10
123 08 10/11 20


Some parts may repeatd in the same month. I have figured out how to get the
total quantity but trying to break in it down in months has me somewhat
stumped.

TIA

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Getting the Sum from months

That worked for the most part, the MONTH didn't work correctly, what it gave
me was the total qty for the Part#. The way I have the date appears as "08
9/04" year month day. I would also need it by year.

I'm learning this on my own. Thanks for the help your giving me.

"Mike H" wrote:

Hi,

I'm not sure I understand but try this

=SUMPRODUCT((A2:A20=123)*(MONTH(B2:B20=1)*(C2:C20) ))

This will sum Column C if the part number is 123 and the month is 1 (Jan)

In practice I'd use cell references and have the part number and month in a
cell.

Mike



"noreaster" wrote:

I have 3 columns A-part numbers, B-Date (year, month, date) and C-quantity.
What I'm trying to figure out is how to get a Qty for Part for a month for
each month and do the same for each part. The sum would go to a cell.
ie
Part Date Qty
123 08 10/10 15
124 08 10/10 10
123 08 10/11 20


Some parts may repeatd in the same month. I have figured out how to get the
total quantity but trying to break in it down in months has me somewhat
stumped.

TIA

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Getting the Sum from months

I played with the formula and this works
=SUMPRODUCT((A2:A1000=123)*((MONTH(B2:B1000)=1)*(C 2:C1000)))
I'm still trying to figure how to seperate by years



"noreaster" wrote:

That worked for the most part, the MONTH didn't work correctly, what it gave
me was the total qty for the Part#. The way I have the date appears as "08
9/04" year month day. I would also need it by year.

I'm learning this on my own. Thanks for the help your giving me.

"Mike H" wrote:

Hi,

I'm not sure I understand but try this

=SUMPRODUCT((A2:A20=123)*(MONTH(B2:B20=1)*(C2:C20) ))

This will sum Column C if the part number is 123 and the month is 1 (Jan)

In practice I'd use cell references and have the part number and month in a
cell.

Mike



"noreaster" wrote:

I have 3 columns A-part numbers, B-Date (year, month, date) and C-quantity.
What I'm trying to figure out is how to get a Qty for Part for a month for
each month and do the same for each part. The sum would go to a cell.
ie
Part Date Qty
123 08 10/10 15
124 08 10/10 10
123 08 10/11 20


Some parts may repeatd in the same month. I have figured out how to get the
total quantity but trying to break in it down in months has me somewhat
stumped.

TIA

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Getting the Sum from months

I suppose your dates are true dates for the MONTH function to work, so
you could do it this way:

=SUMPRODUCT((A2:A1000=123)*(MONTH(B2:B1000)=1)*(YE AR(B2:B1000)=2008)*(C2:C1000))

or like this:

=SUMPRODUCT((A2:A1000=123)*(TEXT(B2:B1000,"mmmyy") ="Jan08")*(C2:C1000))

Both would check for January 2008, but you would need to change the
formulae for other months - better to use cells to hold the month and
year so that the formula does not need to be modified.

Hope this helps.

Pete

On Oct 10, 6:53*pm, noreaster
wrote:
I played with the formula and this works
=SUMPRODUCT((A2:A1000=123)*((MONTH(B2:B1000)=1)*(C 2:C1000)))
I'm still trying to figure how to seperate by years



"noreaster" wrote:
That worked for the most part, the MONTH didn't work correctly, what it gave
me was the total qty for the Part#. The way I have the date appears as "08
9/04" *year month day. I would also need it by year.


I'm learning this on my own. Thanks for the help your giving me.


"Mike H" wrote:


Hi,


I'm not sure I understand but try this


=SUMPRODUCT((A2:A20=123)*(MONTH(B2:B20=1)*(C2:C20) ))


This will sum Column C if the part number is 123 and the month is 1 (Jan)


In practice I'd use cell references and have the part number and month in a
cell.


Mike


"noreaster" wrote:


I have 3 columns A-part numbers, B-Date (year, month, date) and C-quantity.
What I'm trying to figure out is how to get a Qty for Part for a month for
each month and do the same for each part. The sum would go to a cell.
ie
Part *Date * * * Qty
123 *08 10/10 *15
124 *08 10/10 *10
123 *08 10/11 *20


Some parts may repeatd in the same month. I have figured out how to get the
total quantity but trying to break in it down in months has me somewhat
stumped.


TIA- Hide quoted text -


- Show quoted text -




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Getting the Sum from months

Same way


YEAR(B2:B20)=2007


for instance

--


Regards,


Peo Sjoblom

"noreaster" wrote in message
...
I played with the formula and this works
=SUMPRODUCT((A2:A1000=123)*((MONTH(B2:B1000)=1)*(C 2:C1000)))
I'm still trying to figure how to seperate by years



"noreaster" wrote:

That worked for the most part, the MONTH didn't work correctly, what it
gave
me was the total qty for the Part#. The way I have the date appears as
"08
9/04" year month day. I would also need it by year.

I'm learning this on my own. Thanks for the help your giving me.

"Mike H" wrote:

Hi,

I'm not sure I understand but try this

=SUMPRODUCT((A2:A20=123)*(MONTH(B2:B20=1)*(C2:C20) ))

This will sum Column C if the part number is 123 and the month is 1
(Jan)

In practice I'd use cell references and have the part number and month
in a
cell.

Mike



"noreaster" wrote:

I have 3 columns A-part numbers, B-Date (year, month, date) and
C-quantity.
What I'm trying to figure out is how to get a Qty for Part for a
month for
each month and do the same for each part. The sum would go to a cell.
ie
Part Date Qty
123 08 10/10 15
124 08 10/10 10
123 08 10/11 20


Some parts may repeatd in the same month. I have figured out how to
get the
total quantity but trying to break in it down in months has me
somewhat
stumped.

TIA



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Getting the Sum from months

The first one works great, the 2nd one dont, could be at my end.
Thank you very much.
Now I'm trying to use it to get the data from another sheet.

"Pete_UK" wrote:

I suppose your dates are true dates for the MONTH function to work, so
you could do it this way:

=SUMPRODUCT((A2:A1000=123)*(MONTH(B2:B1000)=1)*(YE AR(B2:B1000)=2008)*(C2:C1000))

or like this:

=SUMPRODUCT((A2:A1000=123)*(TEXT(B2:B1000,"mmmyy") ="Jan08")*(C2:C1000))

Both would check for January 2008, but you would need to change the
formulae for other months - better to use cells to hold the month and
year so that the formula does not need to be modified.

Hope this helps.

Pete

On Oct 10, 6:53 pm, noreaster
wrote:
I played with the formula and this works
=SUMPRODUCT((A2:A1000=123)*((MONTH(B2:B1000)=1)*(C 2:C1000)))
I'm still trying to figure how to seperate by years



"noreaster" wrote:
That worked for the most part, the MONTH didn't work correctly, what it gave
me was the total qty for the Part#. The way I have the date appears as "08
9/04" year month day. I would also need it by year.


I'm learning this on my own. Thanks for the help your giving me.


"Mike H" wrote:


Hi,


I'm not sure I understand but try this


=SUMPRODUCT((A2:A20=123)*(MONTH(B2:B20=1)*(C2:C20) ))


This will sum Column C if the part number is 123 and the month is 1 (Jan)


In practice I'd use cell references and have the part number and month in a
cell.


Mike


"noreaster" wrote:


I have 3 columns A-part numbers, B-Date (year, month, date) and C-quantity.
What I'm trying to figure out is how to get a Qty for Part for a month for
each month and do the same for each part. The sum would go to a cell.
ie
Part Date Qty
123 08 10/10 15
124 08 10/10 10
123 08 10/11 20


Some parts may repeatd in the same month. I have figured out how to get the
total quantity but trying to break in it down in months has me somewhat
stumped.


TIA- Hide quoted text -


- Show quoted text -



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating months with half months. adelaide Excel Discussion (Misc queries) 1 June 6th 08 08:36 PM
3 months prior and 3 months post a date renee Excel Worksheet Functions 2 May 2nd 08 05:46 PM
Adding months to dates should account for 28-30-31 day months Graham Excel Worksheet Functions 3 February 1st 06 12:06 PM
converting months to years and months??? Marty Excel Discussion (Misc queries) 1 February 18th 05 02:38 AM
How do i change 15 months to read 1 year and 3 months? Marty Excel Discussion (Misc queries) 1 February 17th 05 11:21 PM


All times are GMT +1. The time now is 10:12 AM.

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

About Us

"It's about Microsoft Excel"