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

Lookup and Reference Examples

  • Extract all partial matches in Excel
  • How to get last column number in range in Excel
  • How to create dynamic named range with OFFSET in Excel
  • MATCH function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel ROW Function

Data Analysis Examples

  • Get column index in Excel Table
  • Create Scatter Chart in Excel
  • Excel Frequency Function Example
  • Number and Text Filters Examples in Excel
  • How to combine 2 or more chart types in a single chart in Excel

Data Validation Examples

  • Excel Data validation date in next 30 days
  • Prevent invalid data entering in specific cells
  • Excel Data validation allow weekday only
  • Excel Data validation allow uppercase only
  • Excel Data validation no punctuation

Conditional Formatting New Rule with Formulas in Excel

by

If the Highlight Cells Rules, Top/Bottom Rules, Data Bars, Color Scales and Icon Sets are not sufficient, you can create a new rule. For example, highlight the codes below that occur more than once in the range A2:A10 andhave a score greater than 100.

1. Select the range A2:A10.


2. On the Home tab, in the Styles group, click Conditional Formatting.

Worked Example:   Highlight every other row in Excel

3. Click New Rule.

Note: Highlight Cells Rules, Top/Bottom Rules, Data Bars, Color Scales and Icon Sets are shortcuts. They can also be found under New Rule.

4. Select ‘Use a formula to determine which cells to format’.

5. Enter the formula =AND(COUNTIF($A$2:$A$10,A2)>1,B2>100)

6. Select a formatting style and click OK.

Worked Example:   Highlight numbers that include symbols in Excel

Result. Excel formats cell A5 because code A occurs more than once in the range A2:A10 and the value 150 in cell B5 is greater than 100.

Explanation: COUNTIF($A$2:$A$10,A2) counts the number of codes in the range A2:A10 that are equal to the code in cell A2. If COUNTIF($A$2:$A$10,A2) > 1 and B2 > 100, Excel formats cell A2. Because we selected the range A2:A10 before we clicked on Conditional Formatting, Excel automatically copies the formula to the other cells. Thus, cell A3 contains the formula =AND(COUNTIF($A$2:$A$10,A3)>1,B3>100), cell A4 =AND(COUNTIF($A$2:$A$10,A4)>1,B4>100), etc. Notice how we created an absolute reference ($A$2:$A$10) to fix this reference.

Worked Example:   Highlight missing values in Excel

Post navigation

Previous Post:

Freeze and Unfreeze Panes in Excel

Next Post:

Quickly Highlight Cells Containing Different Content in a Row

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
  • CONCATENATE function: Description, Usage, Syntax, Examples and Explanation
  • TEXTJOIN function: Description, Usage, Syntax, Examples and Explanation
  • FIND, FINDB functions: Description, Usage, Syntax, Examples and Explanation
  • SEARCH, SEARCHB functions: Description, Usage, Syntax, Examples and Explanation
  • Split text and numbers in Excel
  • YEAR function: Description, Usage, Syntax, Examples and Explanation
  • Count holidays between two dates in Excel
  • DAY function: Description, Usage, Syntax, Examples and Explanation
  • Convert Excel time to decimal seconds
  • TIMEVALUE function: Description, Usage, Syntax, Examples and Explanation
  • PDURATION function: Description, Usage, Syntax, Examples and Explanation
  • ODDFPRICE function: Description, Usage, Syntax, Examples and Explanation
  • INTRATE function: Description, Usage, Syntax, Examples and Explanation
  • Calculate loan interest in given year in Excel
  • How to calculate annuity for interest rate in excel
Acronyms, Abbreviations, Initialism & What They Stand For
© 2021 xlsoffice. All Rights Reserved | Teal Smiles