• Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us

No products in the cart.

  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us

No products in the cart.

  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us

No products in the cart.

  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us
Excel

The Double Negatives (–) in Excel

0 Comments

The Double Negatives (–) in Excel. In advanced Excel formulas, you may have come across the use of double negative signs (–) in some situations. These double minus signs serve a specific purpose in Excel formulas, especially when working with boolean values.

The primary function of double negatives is to convert boolean values into binary values. Specifically, they are used to transform TRUE and FALSE values into 1s and 0s, respectively. This is particularly useful when working with array functions and complex formulas in Excel. Let’s look at an example to understand this better.

The Double Negatives (–) in ExcelDouble Negatives 1

Example:

Suppose we have a list of numbers, and we want to count how many of them are less than 50. While the COUNTIF function can easily achieve this, let’s use the SUMPRODUCT function to learn about the double minus symbol in Excel formulas.

  • Write the following formula in cell C2: =A2:A11<50Double Negatives 2

When you hit enter, it will display “FALSE.” However, the formula is actually returning an array of TRUE and FALSE values, which you can verify by selecting the formula in edit mode and pressing the F9 key. The array will look like this: {FALSE;TRUE;TRUE;TRUE;TRUE;FALSE;TRUE;FALSE;TRUE;TRUE}, where TRUE represents values less than 50 in the range A2:A11.Double Negatives 3

  • To convert these boolean values into 1s and 0s, add the — sign before the statement: =–(A2:A11<50)

Now, when you hit enter, it will show “0” because the first value in the array is not less than 50. But if you use the debugging key F9, you will see an array of 1s and 0s: {0;1;1;1;1;0;1;0;1;1}, where each TRUE value is represented by 1.

  • To count the number of values that are less than 50, wrap the formula inside the SUMPRODUCT function: =SUMPRODUCT(–(A2:A11<50))

The formula will sum up the array returned by the internal statement, and in this case, the result will be 7.

If you were to remove the double negatives (–), and make the formula =SUMPRODUCT((A2:A11<50)), it would return 0. This is because the array returned by A2:A11<50 contains boolean values, and the SUMPRODUCT function cannot directly sum boolean values.

Alternative ways to achieve the same result of converting boolean values into binary values include adding 0 to boolean values, multiplying them by 1, or using the N function:

=SUMPRODUCT((A2:A11<50)+0) =SUMPRODUCT((A2:A11<50)*1) =SUMPRODUCT(N(A2:A11<50))Double Negatives 4

All of the above formulas will accomplish the task. While the double minus sign (–) is one way to perform this conversion, there are other valid alternatives as well. The use of double negatives was illustrated in this simple scenario, but in more complex situations, you may encounter situations where you need to convert boolean values into binary values, and these techniques can be helpful.

 

Rate this post
34
247 Views
10 Excel functions that every accountant must usePrev10 Excel functions that every accountant must useJuly 22, 2023
Restricting Input Based on Adjacent Cell's Specific Text in ExcelJuly 24, 2023Restricting Input Based on Adjacent Cell's Specific Text in ExcelNext

Leave a Reply Cancel reply

You must be logged in to post a comment.

Buy Windows 11 Professional MS Products CD Key
Buy Office 2021 Professional Plus Key Global For 5 PC
Top rated products
  • Windows Server 2022 Remote Desktop Services User Connections (50) Cal Key Global Windows Server 2022 Remote Desktop Services User Connections (50) Cal Key Global
    Rated 5.00 out of 5
    $22.00
  • AVG Ultimate 2021 with Antivirus + Cleaner, Secure VPN 10 Devices 2 Years AVG Ultimate 2021 with Antivirus + Cleaner, Secure VPN 10 Devices 2 Years
    Rated 5.00 out of 5
    $47.00
  • Avast Premium Security 2021 10 Devices 1 Year Global Avast Premium Security 2021 10 Devices 1 Year Global
    Rated 5.00 out of 5
    $28.00
  • Avast Ultimate Suite 2021 3 Years 10 Devices Global Avast Ultimate Suite 2021 3 Years 10 Devices Global
    Rated 5.00 out of 5
    $90.00
  • Windows Server 2022 Remote Desktop Services Device Connections (50) Cal Key Global Windows Server 2022 Remote Desktop Services Device Connections (50) Cal Key Global
    Rated 5.00 out of 5
    $22.00
Products
  • Buy Office 2021 Professional Plus Key Global Bind To Your Microsoft Account Buy Office 2021 Professional Plus Key Global Bind To Your Microsoft Account
    Rated 4.71 out of 5
    $99.00
  • Windows Server 2012 R2 Standard Key Global Windows Server 2012 R2 Standard Key Global
    Rated 4.78 out of 5
    $15.00
  • Windows Server 2019 Remote Desktop Services 50 USER Connections Key Global Windows Server 2019 Remote Desktop Services 50 USER Connections Key Global
    Rated 4.75 out of 5
    $20.00
  • Avast SecureLine VPN 2021 2 Years 5 Devices Global Avast SecureLine VPN 2021 2 Years 5 Devices Global
    Rated 5.00 out of 5
    $47.00
  • Windows Server 2025 Remote Desktop Services 50 User Connections Windows Server 2025 Remote Desktop Services 50 User Connections $25.00
  • Buy Office 2021 Professional Plus Key Global For 5 PC Buy Office 2021 Professional Plus Key Global For 5 PC
    Rated 5.00 out of 5
    $68.00
  • Project Professional 2021 Microsoft Project Professional 2021 - 1 PC $13.00
  • Buy Microsoft Office Professional Plus 2019 CD Key Global - 5 PC Buy Microsoft Office Professional Plus 2019 CD Key Global - 5 PC
    Rated 4.95 out of 5
    $32.00
  • Windows 10 Pro Key Global Windows 10 Pro Key Global
    Rated 4.74 out of 5
    $6.00
  • Microsoft Visio 2016 professional CD Key Global Microsoft Visio 2016 professional CD Key Global
    Rated 4.94 out of 5
    $28.50
Product categories
  • Anti Virus
  • Microsoft Office
  • Microsoft Project
  • Microsoft Visio
  • Microsoft Visual
  • Microsoft Windows
  • Other Software
  • Uncategorized

Buffcom.net always brings the best digital products and services to you. Specializing in Office Software and online marketing services

BIG SALE 50% IN MAY

Microsoft Office
Microsoft Windows
Anti-Virus
Contact Us

Visit Us:

125 Division St, New York, NY 10002, USA

Mail Us:

buffcom.net@gmail.com

TERMS & CONDITIONS | PAYMENT GUIDE  | SHIPPING POLICY  | REFUND POLICY

Copyright © 2019 buffcom.net  All Rights Reserved.