Sumproduct Function

I am porting a Sumproduct function from Excel to Numbers (v4.3) and would need help writing and formatting the statement/syntax in Numbers.


Excel Statement:

=SUMPRODUCT(--(B1>$A$1:$A$4);--(B1-$A$1:$A$4);$C$1:$C$4)


How would the Numbers statement and syntax look like for the Excel formula above?


I have 2 arrays/lists and 1 variable:


Array/List 1


Values


A1: 0%

A2: 10%

A3: 20%
A4: 30%


Array/List 2


Values


C1: 20%

C2: 15%

C3: 75%
C4: -15%


Variable


Value


B1: 22%




Appreciate it.

MacBook Pro with Retina display, macOS High Sierra (10.13), null

Posted on Oct 23, 2017 3:37 PM

Reply
5 replies

Oct 24, 2017 7:15 AM in response to SGIII

The direct equivalent in Numbers would be this:


User uploaded file


Columns A thru C are the values in your example.


The formula in D1, filled down to D4, is:


=IF($B$1>A1,1,0)


or =IF($B$1>A1;1;0) in your region.


The formula in E1, filled down to E4, is:


=$B$1−A1


The formula in E6 is:


=SUMPRODUCT(C1:C4,D1:D4,E1:E4)


or =SUMPRODUCT(C1:C4;D1:D4;E1:E4) in your region



SG

Oct 23, 2017 6:16 PM in response to mroceans

Numbers doesn't support most array functions (this form of SUMPRODUCT is an array function). Could you describe what the function is doing in your particular case, perhaps even with a screenshot? The general approach in Numbers will be to break the calculation into steps, using an extra column or columns, but I'm not sure I follow exactly what is happening in your example.


SG

Oct 23, 2017 7:28 PM in response to SGIII

Hi SG,


I'm much relieved by your 'confession'! I'm certain I don't follow what's happening in this formula beyond seeing that

"--(B1>$A$1:$A$4)" appears to be a condition limiting calculations to values in A1:A4 that are less than the value in B1.😕


Which implies that SUMIF or COUNTIF will probably be involved in a Numbers solution.


Regards,

Barry

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Sumproduct Function

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.