Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2016-11-25
3
Medium Priority
?
59 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 37

Accepted Solution

by:
Kimputer earned 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

824 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