Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Conditional sum - Two dimensional (advanced)

Hi

Can you help?

I would like to sum a matrix according to a condition in a row and in
different condition in a column. I know how to do this one dimensionally
(either in the row or the column) using sumproduct, but what about two
dimensions?

Let me give an example, number of widgets produced each week by each type of
machine

A B C D
1 weeks1 2 3
2 Type 1 10 15 11
3 Type 2 20 5 10
4 Type 1 5 12 21
Etc


So, Id like the formula to be able to Sum the number of widgets produced by
machine type 1 after week1 (ie. Weeks 1)

The formula should give the answer 15+11+12+21 = 59

Thank you


p.s. No macros please

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Conditional sum - Two dimensional (advanced)

Hi,

I reproduced your table in A1 to D4

and then the formula. Note carefull each of the ranges when setting this up
for your table

B1:D11 Is the header row excluding A1
A2:A4="Type 1" is the header column excluding A1
B2:D4 Is the data range excluding the headers

=SUMPRODUCT((B1:D11)*(A2:A4="Type 1")*B2:D4)


--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"StephenT" wrote:

Hi

Can you help?

I would like to sum a matrix according to a condition in a row and in
different condition in a column. I know how to do this one dimensionally
(either in the row or the column) using sumproduct, but what about two
dimensions?

Let me give an example, number of widgets produced each week by each type of
machine

A B C D
1 weeks1 2 3
2 Type 1 10 15 11
3 Type 2 20 5 10
4 Type 1 5 12 21
Etc


So, Id like the formula to be able to Sum the number of widgets produced by
machine type 1 after week1 (ie. Weeks 1)

The formula should give the answer 15+11+12+21 = 59

Thank you


p.s. No macros please

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Conditional sum - Two dimensional (advanced)

Works a treat. Wow, Sumproduct works across a matrix.

Is it wrong to love a formula? If so, I don't care, I ™¥ SUMPRODUCT

Thanks Mike

"Mike H" wrote:

Hi,

I reproduced your table in A1 to D4

and then the formula. Note carefull each of the ranges when setting this up
for your table

B1:D11 Is the header row excluding A1
A2:A4="Type 1" is the header column excluding A1
B2:D4 Is the data range excluding the headers

=SUMPRODUCT((B1:D11)*(A2:A4="Type 1")*B2:D4)


--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"StephenT" wrote:

Hi

Can you help?

I would like to sum a matrix according to a condition in a row and in
different condition in a column. I know how to do this one dimensionally
(either in the row or the column) using sumproduct, but what about two
dimensions?

Let me give an example, number of widgets produced each week by each type of
machine

A B C D
1 weeks1 2 3
2 Type 1 10 15 11
3 Type 2 20 5 10
4 Type 1 5 12 21
Etc


So, Id like the formula to be able to Sum the number of widgets produced by
machine type 1 after week1 (ie. Weeks 1)

The formula should give the answer 15+11+12+21 = 59

Thank you


p.s. No macros please

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Conditional sum - Two dimensional (advanced)

Gald I could help,

I'm inviting contrary opinion but I believe Sumproduct to be the most
powerful and versaltile formula in Excel
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"StephenT" wrote:

Works a treat. Wow, Sumproduct works across a matrix.

Is it wrong to love a formula? If so, I don't care, I ™¥ SUMPRODUCT

Thanks Mike

"Mike H" wrote:

Hi,

I reproduced your table in A1 to D4

and then the formula. Note carefull each of the ranges when setting this up
for your table

B1:D11 Is the header row excluding A1
A2:A4="Type 1" is the header column excluding A1
B2:D4 Is the data range excluding the headers

=SUMPRODUCT((B1:D11)*(A2:A4="Type 1")*B2:D4)


--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"StephenT" wrote:

Hi

Can you help?

I would like to sum a matrix according to a condition in a row and in
different condition in a column. I know how to do this one dimensionally
(either in the row or the column) using sumproduct, but what about two
dimensions?

Let me give an example, number of widgets produced each week by each type of
machine

A B C D
1 weeks1 2 3
2 Type 1 10 15 11
3 Type 2 20 5 10
4 Type 1 5 12 21
Etc


So, Id like the formula to be able to Sum the number of widgets produced by
machine type 1 after week1 (ie. Weeks 1)

The formula should give the answer 15+11+12+21 = 59

Thank you


p.s. No macros please

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
Advanced Conditional Formatting [email protected] Excel Worksheet Functions 8 September 22nd 08 01:33 PM
Transposing from two dimensional to one dimensional VickiMc Excel Worksheet Functions 3 July 17th 08 09:00 AM
Advanced conditional formatting oli_qld Excel Discussion (Misc queries) 3 November 3rd 07 09:38 PM
Advanced Conditional Formatting Ideas Needed! (ok, maybe not that advanced...) shadestreet Excel Discussion (Misc queries) 2 July 21st 06 03:04 PM
Conditional Format Advanced Tiegris Excel Worksheet Functions 2 November 8th 04 05:46 PM


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