Solved

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

Posted on 2016-11-25
3
40 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

749 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