ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   use month in cell date to sum all relevant cells (https://www.excelbanter.com/excel-worksheet-functions/449007-use-month-cell-date-sum-all-relevant-cells.html)

Chris Smith[_5_]

use month in cell date to sum all relevant cells
 
Hi - I have a Sheet of orders entered in rows, order date is col D and order quantities in columns O through AM (1 product per column, if not required cell is blank). On a different sheet I am trying to sum all the orders for each product / month

I have entered
=SUMIF(MONTH('Sheet1'!$D$6:$D$1008),4,'Sheet1'!O$6 :O$1008)
meaning if the month value in the cell is 4 (April) count any quantity in corresponding cell column O.

What have I done wrong please?

Thanks for looking

Claus Busch

use month in cell date to sum all relevant cells
 
Hi Chris,

Am Tue, 16 Jul 2013 13:09:22 -0700 (PDT) schrieb Chris Smith:

=SUMIF(MONTH('Sheet1'!$D$6:$D$1008),4,'Sheet1'!O$6 :O$1008)


try:
=SUM(IF(MONTH(D6:D1008)=4,O6:O1008))
and enter the array formula with CTRL+Shift+Enter
or:
=SUMPRODUCT(--(MONTH(D6:D1008)=4),O6:O1008)


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

Chris Smith[_5_]

use month in cell date to sum all relevant cells
 
Thank you Claus

I should have thought of SUMPRODUCT - It is extremely useful and better than an array I think.

Chris


All times are GMT +1. The time now is 06:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com