Sumproduct help

Joneye

Well-known Member
Joined
May 28, 2010
Messages
785
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
What does the "--" relate to in the formula. I know I need to use it with words and then numbers. But a colleague has asked me what it relates to and how it works.

Is it a syntax?


=SUMPRODUCT(--($B$65:$B$75=$B80),--($D$65:$D$75))
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
I believe it changes the result of a true/false enqiery into 1 or 0.

In the example given...


=SUMPRODUCT(--($B$65:$B$75=$B80),--($D$65:$D$75))

The -- are net required in the formula.

The -- indicate which of B65-B75= B80 returning 1 if it does or 0 if not.

1*the corresponding item in D65-D75 returnes the reqiered value.
0*the corresponding item in D65-D75 returnes 0.

Add these up and Bobs your uncle!

As for wheter its a syntax... Not my experties I'm affraid!

Anyone else?

Regards


Roger
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,862
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top