Can someone explain me this formula

smalik

Board Regular
Joined
Oct 26, 2006
Messages
180
Office Version
  1. 365
Platform
  1. Windows
=SUMPRODUCT(--(A1=sheet!$B$2:$B$5697),--(sheet!$E$2:$E$5697))

Can someone explain to me the significance of -- in the above formula. I remember seeing the -- used in other formulae as well but never understood.

Thanks.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
The -- is used to coerce arrays of False/True values into the numbers 0/1 that sumproduct can work with.
 
Upvote 0
The -- is used to coerce arrays of False/True values into the numbers 0/1 that sumproduct can work with.

Thanks. This is helpful but can you give me an example. I am trying to learn this so that I can use it if and when there is a need. Thanks in advance for your help and time.
 
Upvote 0

Forum statistics

Threads
1,213,532
Messages
6,114,176
Members
448,554
Latest member
Gleisner2

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