Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • Lookup entire row in Excel
  • Two-column Lookup in Excel
  • How to create dynamic named range with OFFSET in Excel
  • MATCH function: Description, Usage, Syntax, Examples and Explanation
  • Extract all partial matches in Excel

Data Analysis Examples

  • Number and Text Filters Examples in Excel
  • How to calculate current stock or inventory in Excel
  • How to Create Area Chart in Excel
  • Conditional Formatting Icon Sets Examples in Excel
  • How to Create Thermometer Chart in Excel

Data Validation Examples

  • Excel Data validation must not contain
  • Excel Data validation specific characters only
  • Excel Data validation number multiple 100
  • Data validation must not exist in list
  • Excel Data validation don’t exceed total

Force negative numbers to zero in Excel

by

This tutorial shows how to Force negative numbers to zero in Excel using the example below;

Formula

=MAX(value,0)

Explanation

To force negative numbers to zero without affecting positive numbers, you can use a formula based on the MAX function. In the example shown, the formula in D5 is:

=MAX(C5-B5,0)

How this formula works

This formula takes advantage of the fact that the MAX function works fine with small sets of data — even two values.

Worked Example:   Extract data with helper column in Excel

Inside MAX, the value in B5 is subtracted from the value in C5. If the result is positive, MAX will return the result as-is, since positive numbers are always greater than zero.

Worked Example:   Calculate cap percentage at specific amount in Excel

If the result if negative, MAX will return zero.

Worked Example:   Find longest string with criteria in Excel

Replacement for IF

This formula is a clever way to avoid a more complicated IF formula. You can use the MIN and MAX functions to replace IF when you want to return the smaller or greater of two values.

Post navigation

Previous Post:

Win loss points calculation in Excel

Next Post:

If cell begins with x, y, or z in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others
  • How to count keywords in a range of cell
  • How to count number of characters of text in a cell in Excel
  • How to convert text string to array in Excel
  • How to extract multiple lines from a cell in Excel
  • How to pad text to match equal length in Excel
  • Get month name from date in Excel
  • Get last weekday in month in Excel
  • Get days, months, and years between dates in Excel
  • Convert Unix time stamp to Excel date
  • Get week number from date in Excel
  • PPMT function: Description, Usage, Syntax, Examples and Explanation
  • YIELD function: Description, Usage, Syntax, Examples and Explanation
  • Compound Annual Growth Rate CAGR formula examples in Excel
  • IRR function: Description, Usage, Syntax, Examples and Explanation
  • COUPNUM function: Description, Usage, Syntax, Examples and Explanation
© 2022 xlsoffice . All Right Reserved. | Teal Smiles