Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Garth
 
Posts: n/a
Default Summing cells in array

Hi

Using Excel XP I have a table with months in column A designated as 08-2004,
09-2004, 10-2004 etc. In column B against each month I have a number
representing hours. What I want to do is input in a cell on another sheet a
selected month ie 10-2004 and then return two values into selected cells:
1) The sum of the hours in any months preceding the date I have entered
2) The sum of the hours in any months after the date I entered plus the
hours in the month entered.

As always any assistance will be gratefully received.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Duke Carey
 
Posts: n/a
Default Summing cells in array


=sumproduct(--(A1:A100<testdate/testvalue),B1:B100)
=sumproduct(--(A1:A100=testdate/testvalue),B1:B100)


"Garth" wrote:

Hi

Using Excel XP I have a table with months in column A designated as 08-2004,
09-2004, 10-2004 etc. In column B against each month I have a number
representing hours. What I want to do is input in a cell on another sheet a
selected month ie 10-2004 and then return two values into selected cells:
1) The sum of the hours in any months preceding the date I have entered
2) The sum of the hours in any months after the date I entered plus the
hours in the month entered.

As always any assistance will be gratefully received.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Garth
 
Posts: n/a
Default Summing cells in array

Hi

I have tried inputting this formula but it returns 0

A sample of data might be:

A B
Mth Hours
07-2005 50
08-2005 100
09-2005 50
10-2005 75
11-2005 50
12-2005 50

If I enter a test value of 09-2005 I need the formula to return 150 for the
first value and 225 for the second.

I have tried entering this as a standard formula and an array formula.

What am I doing wrong ?

G


"Duke Carey" wrote:


=sumproduct(--(A1:A100<testdate/testvalue),B1:B100)
=sumproduct(--(A1:A100=testdate/testvalue),B1:B100)


"Garth" wrote:

Hi

Using Excel XP I have a table with months in column A designated as 08-2004,
09-2004, 10-2004 etc. In column B against each month I have a number
representing hours. What I want to do is input in a cell on another sheet a
selected month ie 10-2004 and then return two values into selected cells:
1) The sum of the hours in any months preceding the date I have entered
2) The sum of the hours in any months after the date I entered plus the
hours in the month entered.

As always any assistance will be gratefully received.

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
How to multiply all cells in array by factor rhauff Excel Discussion (Misc queries) 2 March 21st 06 03:01 PM
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM
Summing only those cells that aren't hidden JodyK Excel Worksheet Functions 5 September 13th 05 06:35 PM
What cells in a array equal my value? Stephen Excel Worksheet Functions 10 July 20th 05 08:59 PM
Summing cells in Excel marilena Excel Worksheet Functions 0 November 6th 04 11:55 PM


All times are GMT +1. The time now is 09:46 AM.

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

About Us

"It's about Microsoft Excel"