Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Sumproduct with three arrays

Hello and thank you in advance for your assistance.

I have a spreadsheet as follows:

Column C= Revenue
Column D= Units
Column E = Months, as a number (i.e. 1-12)
Column F = Status, expressed as either Prospect or Definite
Column G = Year (i.e. 2009)

Column A,B are labels and not used in the calculations.

I want to sum the units and revenue based on year, month, and status (i.e.,
how many units sold in January of 2009 that are in Prospect status). The
result for unit and revenue are in two other columns, K & L (i.e. there is a
summary cell for unit based on month, year and status, and another for
revenue based on month, year, and status)

The formula I am using is:
=SUMPRODUCT(--(G1:G500="2009"),--(F1:F500="Prospect"),--(E1:E500="1"),D1:D500) for units, and

=SUMPRODUCT(--(G1:G500="2009"),--(F1:F500="Prospect"),--(E1:E500="1"),C1:C500) for revenue

Excel returns 0, which I know is incorrect. I have tried removing the
quotes from the year and the month, but still get 0. I have checked the cell
format for the result cell and it is set to number format.

Thanks again for your thoughts.

Best regards,

Alberto







  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
~L ~L is offline
external usenet poster
 
Posts: 177
Default Sumproduct with three arrays

Definitely leave the quotes off on the year and month and make sure numbers
are numbers and not stored as text.
Even if you set a number-stored-as-text to number format, it may still be
read as text by Excel. Try copying a blank cell and using paste special to
subtract from all of the cells in your year and month ranges.

Also, use absolute references on your ranges if the formula is going to move
at all.

Finally, in your data make sure there are no leading or trailing spaces (or
characters that look like spaces) in the text columns by editing the entry in
the formula bar and selecting the entire contents.

=SUMPRODUCT(--($G$1:$G$500=2009),--($F$1:$F$500="Prospect"),--($E$1:$E$500=1),$D$1:$D$500)

=SUMPRODUCT(--($G$1:$G$500=2009),--($F$1:$F$500="Prospect"),--($E$1:$E$500=1),$C$1:$C$500)

If none of the above work, try hitting F9 to see if your workbook is on
manual calculation.

And if none of that works, open a blank sheet and do the following:
Highlight 500 cells and in the first cell type =Sheet1!$G$1:$G$500=2009 then
enter it using control+shift+enter (this assumes your sheet name is sheet1,
change that if you need to). Repeat this for ranges F and E. This will show
you exactly how the contents of each array are evaluating.
If something is not a match and you know it should be, then you know
something is wrong with the data entered in that cell. Copy the entire
contents of the offending cell, push CTRL+H, paste it into the find field and
replace with a clean entry that you know is correct.


"Alcala" wrote:

Hello and thank you in advance for your assistance.

I have a spreadsheet as follows:

Column C= Revenue
Column D= Units
Column E = Months, as a number (i.e. 1-12)
Column F = Status, expressed as either Prospect or Definite
Column G = Year (i.e. 2009)

Column A,B are labels and not used in the calculations.

I want to sum the units and revenue based on year, month, and status (i.e.,
how many units sold in January of 2009 that are in Prospect status). The
result for unit and revenue are in two other columns, K & L (i.e. there is a
summary cell for unit based on month, year and status, and another for
revenue based on month, year, and status)

The formula I am using is:
=SUMPRODUCT(--(G1:G500="2009"),--(F1:F500="Prospect"),--(E1:E500="1"),D1:D500) for units, and

=SUMPRODUCT(--(G1:G500="2009"),--(F1:F500="Prospect"),--(E1:E500="1"),C1:C500) for revenue

Excel returns 0, which I know is incorrect. I have tried removing the
quotes from the year and the month, but still get 0. I have checked the cell
format for the result cell and it is set to number format.

Thanks again for your thoughts.

Best regards,

Alberto







  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Sumproduct with three arrays

Thanks! It is working now, and I suspect it is the absolute reference and
removing the "" that did the trick as the formulas are now returning
confirmed numbers and I did not do any of the other steps.

Thanks again for your assistance, and have a great weekend!.

Regards,

Alberto

"~L" wrote:

Definitely leave the quotes off on the year and month and make sure numbers
are numbers and not stored as text.
Even if you set a number-stored-as-text to number format, it may still be
read as text by Excel. Try copying a blank cell and using paste special to
subtract from all of the cells in your year and month ranges.

Also, use absolute references on your ranges if the formula is going to move
at all.

Finally, in your data make sure there are no leading or trailing spaces (or
characters that look like spaces) in the text columns by editing the entry in
the formula bar and selecting the entire contents.

=SUMPRODUCT(--($G$1:$G$500=2009),--($F$1:$F$500="Prospect"),--($E$1:$E$500=1),$D$1:$D$500)

=SUMPRODUCT(--($G$1:$G$500=2009),--($F$1:$F$500="Prospect"),--($E$1:$E$500=1),$C$1:$C$500)

If none of the above work, try hitting F9 to see if your workbook is on
manual calculation.

And if none of that works, open a blank sheet and do the following:
Highlight 500 cells and in the first cell type =Sheet1!$G$1:$G$500=2009 then
enter it using control+shift+enter (this assumes your sheet name is sheet1,
change that if you need to). Repeat this for ranges F and E. This will show
you exactly how the contents of each array are evaluating.
If something is not a match and you know it should be, then you know
something is wrong with the data entered in that cell. Copy the entire
contents of the offending cell, push CTRL+H, paste it into the find field and
replace with a clean entry that you know is correct.


"Alcala" wrote:

Hello and thank you in advance for your assistance.

I have a spreadsheet as follows:

Column C= Revenue
Column D= Units
Column E = Months, as a number (i.e. 1-12)
Column F = Status, expressed as either Prospect or Definite
Column G = Year (i.e. 2009)

Column A,B are labels and not used in the calculations.

I want to sum the units and revenue based on year, month, and status (i.e.,
how many units sold in January of 2009 that are in Prospect status). The
result for unit and revenue are in two other columns, K & L (i.e. there is a
summary cell for unit based on month, year and status, and another for
revenue based on month, year, and status)

The formula I am using is:
=SUMPRODUCT(--(G1:G500="2009"),--(F1:F500="Prospect"),--(E1:E500="1"),D1:D500) for units, and

=SUMPRODUCT(--(G1:G500="2009"),--(F1:F500="Prospect"),--(E1:E500="1"),C1:C500) for revenue

Excel returns 0, which I know is incorrect. I have tried removing the
quotes from the year and the month, but still get 0. I have checked the cell
format for the result cell and it is set to number format.

Thanks again for your thoughts.

Best regards,

Alberto







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
Conditional arrays within SUMPRODUCT Phil H[_2_] Excel Worksheet Functions 0 August 15th 08 10:39 PM
SUMPRODUCT where arrays have different dimensions Chas Excel Discussion (Misc queries) 4 July 25th 07 09:30 PM
Using SUMPRODUCT with arrays Scott@CW Excel Discussion (Misc queries) 3 April 25th 07 02:21 PM
SUMPRODUCT with 3 arrays not working Kierano Excel Worksheet Functions 1 October 16th 06 03:37 PM
Sumproduct arrays L. Howard Kittle Excel Discussion (Misc queries) 4 April 11th 06 01:11 PM


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