Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.newusers,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Summing values in a column if the date in another is of a certain month

Hi,

I hope that this should be quite easy, but I'll be blowed if I can find
an answer on google...


Column F has dates, some rows may be blank

Column G has currency values, some rows may be blank but if a row in
column F has a value, so will the corresponding row in column G

And what I would like to do is produce on another sheet, the total per
month of each year (as set by column F) of the values in column G.

i.e.

December 2006 1234
January 2007 5678

Any help appreciated.

--
Best regards
Harvey Coward

  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.newusers,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Summing values in a column if the date in another is of a certain month



=SUMPRODUCT(--(YEAR(Sheet1!$F$2:$F$200)=YEAR(A1)),--(MONTH(Sheet1!$F$2:$F$200)=MONTH(A1)),Sheet1!$G$2: $G$200)

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Harvey Coward" wrote in message
...
Hi,

I hope that this should be quite easy, but I'll be blowed if I can find an
answer on google...


Column F has dates, some rows may be blank

Column G has currency values, some rows may be blank but if a row in
column F has a value, so will the corresponding row in column G

And what I would like to do is produce on another sheet, the total per
month of each year (as set by column F) of the values in column G.

i.e.

December 2006 1234
January 2007 5678

Any help appreciated.

--
Best regards
Harvey Coward



  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.newusers,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 364
Default Summing values in a column if the date in another is of a certain month

"Harvey Coward" wrote in message
...
Hi,

I hope that this should be quite easy, but I'll be blowed if I can find an
answer on google...


Column F has dates, some rows may be blank

Column G has currency values, some rows may be blank but if a row in
column F has a value, so will the corresponding row in column G

And what I would like to do is produce on another sheet, the total per
month of each year (as set by column F) of the values in column G.

i.e.

December 2006 1234
January 2007 5678

Any help appreciated.

--
Best regards
Harvey Coward


=SUMPRODUCT(--(MONTH(F1:F999)=12),--(YEAR(F1:F999=2006)),G1:G999)
will give you the total for Dec 2006. (Obviously change the ranges to suit
your data.)

You can replace the 12 and 2006 in this formula by appropriate cell
references or formulas.

On the "answer" sheet, I would suggest entering in column A a list of dates,
each being (say) the first of the month (such as 1-Dec-06, 1-Jan-07). You
can format these to display "month and date" if you wish. The formula (in
B1, copied down as far as required) would then become something like:
=SUMPRODUCT(--(Sheet1!MONTH(F1:F999)=MONTH(A1)),--(Sheet1!YEAR(F1:F999)=YEAR(A1)),Sheet1!G1:G999)



  #4   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.newusers,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Summing values in a column if the date in another is of a certain month

Thanks, this works a treat.


In message , Bob Phillips
writes


=SUMPRODUCT(--(YEAR(Sheet1!$F$2:$F$200)=YEAR(A1)),--(MONTH(Sheet1!$F$2:$
F$200)=MONTH(A1)),Sheet1!$G$2:$G$200)


--
Best regards
Harvey Coward

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
summing first 'n' values in a column or row Fran McConville Excel Worksheet Functions 5 April 17th 23 07:01 PM
Summing all numeric values only in cells in a column Brad Excel Worksheet Functions 5 April 3rd 23 11:09 AM
summing last values in column gotta know Excel Worksheet Functions 11 December 27th 06 01:51 PM
Summing one column if two other columns' values appear in other sh JulieU Excel Worksheet Functions 3 April 18th 06 04:48 PM
Summing Values In Current Month Only qflyer Excel Worksheet Functions 3 June 27th 05 06:29 AM


All times are GMT +1. The time now is 10:24 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"