Help about the "--" marking

eladberko

New Member
Joined
Dec 22, 2009
Messages
6
I'm using this formula, found it online. Work's great, but, what is the "--" marking do? I've never seen it before in use. :confused:
SUMPRODUCT(--('CTI '!$E$11:$E$5000=TRIM($B6)),--('CTI '!$J$11:$J$5000=TRIM($I$3)))

thnx !
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
It is used to coerce arrays of False/True to 0/1 that can be multiplied together.
 
Upvote 0
I'm using this formula, found it online. Work's great, but, what is the "--" marking do? I've never seen it before in use. :confused:


SUMPRODUCT(--('CTI '!$E$11:$E$5000=TRIM($B6)),--('CTI '!$J$11:$J$5000=TRIM($I$3)))

thnx !

Expressions like 'CTI '!$E$11:$E$5000=TRIM($B6) are conditionals. We want them to return a set of 1's and 0's instead of a set of TRUE's and FALSE's. The two minusses effect just that. The following is an equivalent rendition:

Code:
=SUM(
    IF('CTI '!$E$11:$E$5000=TRIM($B6),
      IF('CTI '!$J$11:$J$5000=TRIM($I$3),
        1,
        0),
      0)
which you need to confirm with control+shift+enter, not just enter.
 
Upvote 0
thanx ! Its make sense now. when can i find a good sourse for all type of marking ( like "--", "$", etc ..) ?
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

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