Solved

MS Excel  "--" in Formula What is it doing?

Posted on 2016-11-25
3
21 Views
Last Modified: 2016-11-25
Thank you for looking at my question,

I have been sent a spreadsheet that contains a formula with syntax I've not seen before and hope somebody will explain it to me. The formula as it appears in the cell is below.

=SUMPRODUCT(--(DeliveryCountry=$A3)*(--(OrderOrigin="Sales")*(LEFT(Description,2)="FR")*--(LEFT(Type,3)="XL5"))*(Quantity))

Tell me please what does the double minus sign signify?
0
Comment
Question by:Crxfrd
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
Kimputer earned 500 total points
ID: 41901451
It's to coerce TRUE and FALSE values into 1's and 0's
0
 

Author Comment

by:Crxfrd
ID: 41901454
I found out what's happening now, it's acting like a 'WHERE' condition.

=SUMPRODUCT(--(DeliveryCountry=$A3)*(--(OrderOrigin="Sales")*(LEFT(Description,2)="FR")*--(LEFT(Type,3)="XL5"))*(Quantity))

SUMPRODUCT WHERE the content of the cell(s) in column DeliveryCountry =  the contents of ref A3 (in this case Germany)
                           WHERE the content of cell(s) in column OrderOrigin = "Sales" etc
0
 

Author Closing Comment

by:Crxfrd
ID: 41901456
Thank you
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now