Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Everything about Charts in Excel
  • Randomize/ Shuffle List in Excel
  • How to Use Solver Tool in Excel
  • How to count table rows in Excel
  • How to Create One and Two Variable Data Tables in Excel

References

  • How to create dynamic named range with OFFSET in Excel
  • How to get last row in mixed data with blanks in Excel
  • Find Closest Match in Excel Using INDEX, MATCH, ABS and MIN functions
  • MATCH function: Description, Usage, Syntax, Examples and Explanation
  • How to get address of first cell in range in Excel

Data Validations

  • Excel Data validation require unique number
  • Excel Data validation date in specific year
  • Excel Data validation don’t exceed total
  • Data validation must not exist in list
  • Excel Data validation must not contain

If cell equals in Excel

by

This tutorial shows how to calculate If cell equals in Excel using the example below;

Formula

=IF(A1="red",true result,false result)

Explanation

If you want to do something specific when a cell equals a certain value, you can use the IF function to test the value, then do something if the result is TRUE, and (optionally) do something else if the result of the test is FALSE.

If color is red, mark with “x”

In the example shown, we simply want to “mark” or “flag” records where the color is red. In other words, we want to check cells in column xxx, and then take action when they contain the word “red”.

Worked Example:   Sum bottom n values with criteria in Excel

In D6, the formula were using is this:

=IF(B6="red","x","")

In this formula, the logical test is this bit:

B6="red"

This will return TRUE if the value in B6 is “red” and FALSE if not.

Since we want to mark or flag red items, we only need to take action when the result of the test is TRUE. Here, we are simply adding an “x” to column D if when the color is red. If the color is not red (or blank, etc.) , we simply add an empty string (“”).

Worked Example:   How to check cell contains which things in Excel

The result is an x where the color is red, and nothing if not.

Note: if we didn’t add that empty string when FALSE, the formula would display FALSE whenever the color is not red.

Increase price if color is red

Of course, you could do something more complicated as well. For example, let’s say you want to increase the price of red items only by 15%.

Worked Example:   List holidays between two dates in Excel

In that case, you could use this formula in column E to calculate a new price:

=IF(B6="red",C6*1.15,C6)

The test is the same as before (B6=”red”). If the result is TRUE, we multiply the original price by 1.15 (increase by 15%). If the result of the test is FALSE, we simply use the original price as-is.

Post navigation

Previous Post:

VLOOKUP without #N/A error 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

Logical Functions

  • How to use IFS function in Excel
  • Nested IF function example in Excel
  • IFS function: Description, Usage, Syntax, Examples and Explanation
  • How to return blank in place of #DIV/0! error in Excel
  • How to use Excel NOT Function

Date Time

  • NOW function: Description, Usage, Syntax, Examples and Explanation
  • Calculate series of dates by workdays in Excel
  • TODAY function: Description, Usage, Syntax, Examples and Explanation
  • Get work hours between dates in Excel
  • Calculate days remaining in Excel

Grouping

  • Group times into 3 hour buckets in Excel
  • How to randomly assign people to groups in Excel
  • Calculate conditional mode with criteria in Excel
  • Group arbitrary text values in Excel
  • Map text to numbers in Excel

General

  • How to get Excel workbook path only
  • Advanced Number Formats in Excel
  • How to generate random number weighted probability in Excel
  • Freeze and Unfreeze Panes in Excel
  • Find Most Frequently Occurring Word in Excel Worksheet
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning