Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default Use SUMPRODUCT for a matrix

The case is I want to key in two criteria and the function give me back the
total. For example, I want Sun in the rows and Two in the column, then will
give me the total of 2 + 8 = 10. The Sun and the Two is input some where and
will be change from time to time.
A B C D
1 One Two Three
2 Sun 1 2 3
3 Mon 4 5 6
4 Sun 7 8 9

I tried using SUMPRODUCT but did not seem to work, may be due to my
knowledge is not good enough, anyone know how or have other functions that
make it work?

Thanks very much.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Use SUMPRODUCT for a matrix

Hi,

Try this

=SUMPRODUCT((A2:A4="Sun")*(B1:D1="Two")*(B2:D4))

To make it more flexible it would be better to use cell references for the
criteria

=SUMPRODUCT((A2:A4=E1)*(B1:D1=E2)*(B2:D4))


Mike

"Learn-more" wrote:

The case is I want to key in two criteria and the function give me back the
total. For example, I want Sun in the rows and Two in the column, then will
give me the total of 2 + 8 = 10. The Sun and the Two is input some where and
will be change from time to time.
A B C D
1 One Two Three
2 Sun 1 2 3
3 Mon 4 5 6
4 Sun 7 8 9

I tried using SUMPRODUCT but did not seem to work, may be due to my
knowledge is not good enough, anyone know how or have other functions that
make it work?

Thanks very much.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default Use SUMPRODUCT for a matrix

Hi Mike,

That works, thank you.


"Mike H" wrote:

Hi,

Try this

=SUMPRODUCT((A2:A4="Sun")*(B1:D1="Two")*(B2:D4))

To make it more flexible it would be better to use cell references for the
criteria

=SUMPRODUCT((A2:A4=E1)*(B1:D1=E2)*(B2:D4))


Mike

"Learn-more" wrote:

The case is I want to key in two criteria and the function give me back the
total. For example, I want Sun in the rows and Two in the column, then will
give me the total of 2 + 8 = 10. The Sun and the Two is input some where and
will be change from time to time.
A B C D
1 One Two Three
2 Sun 1 2 3
3 Mon 4 5 6
4 Sun 7 8 9

I tried using SUMPRODUCT but did not seem to work, may be due to my
knowledge is not good enough, anyone know how or have other functions that
make it work?

Thanks very much.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Use SUMPRODUCT for a matrix

Your welcome and thanks for the feedback

"Learn-more" wrote:

Hi Mike,

That works, thank you.


"Mike H" wrote:

Hi,

Try this

=SUMPRODUCT((A2:A4="Sun")*(B1:D1="Two")*(B2:D4))

To make it more flexible it would be better to use cell references for the
criteria

=SUMPRODUCT((A2:A4=E1)*(B1:D1=E2)*(B2:D4))


Mike

"Learn-more" wrote:

The case is I want to key in two criteria and the function give me back the
total. For example, I want Sun in the rows and Two in the column, then will
give me the total of 2 + 8 = 10. The Sun and the Two is input some where and
will be change from time to time.
A B C D
1 One Two Three
2 Sun 1 2 3
3 Mon 4 5 6
4 Sun 7 8 9

I tried using SUMPRODUCT but did not seem to work, may be due to my
knowledge is not good enough, anyone know how or have other functions that
make it work?

Thanks very much.

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
Matrix cjgrossley Excel Worksheet Functions 4 October 10th 07 11:49 PM
Matrix Sandy Excel Discussion (Misc queries) 1 September 12th 07 03:52 PM
Matrix multiplication using sumproduct Rasoul Khoshravan Excel Worksheet Functions 3 October 16th 06 11:55 PM
Matrix Attempt at solving a Matrix Problem? Excel Discussion (Misc queries) 2 August 15th 05 12:39 AM
BCG matrix Anneke Charts and Charting in Excel 1 August 10th 05 09:02 PM


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