Solved

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

Posted on 2016-11-25
3
11 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
Comment Utility
It's to coerce TRUE and FALSE values into 1's and 0's
0
 

Author Comment

by:Crxfrd
Comment Utility
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
Comment Utility
Thank you
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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 …
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

772 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

14 Experts available now in Live!

Get 1:1 Help Now