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

Data Analysis

  • Excel Pie Chart
  • Conditional Formatting New Rule with Formulas in Excel
  • Excel Frequency Function Example
  • How to calculate current stock or inventory in Excel
  • How to calculate average last N values in a table in Excel

References

  • How to reference named range different sheet in Excel
  • Find closest match in Excel
  • Create hyperlink with VLOOKUP in Excel
  • How to use Excel MATCH Function
  • To count total rows in a range in Excel

Data Validations

  • Excel Data validation with conditional list
  • Excel Data validation unique values only
  • Excel Data validation only dates between
  • Excel Data validation exists in list
  • Excel Data validation don’t exceed total

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.

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.

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.

Post navigation

Previous Post:

COSH function: Description, Usage, Syntax, Examples and Explanation

Next Post:

Excel Data validation require unique number

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
  • SWITCH function: Description, Usage, Syntax, Examples and Explanation
  • Nested IF function example in Excel
  • OR function Examples in Excel
  • IFNA function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Get days before a date in Excel
  • Get last weekday in month in Excel
  • Generate series of dates by weekends in Excel
  • Calculate total hours that fall between two times in Excel
  • Convert Excel time to decimal minutes

Grouping

  • Map text to numbers in Excel
  • Categorize text with keywords in Excel
  • Group times into unequal buckets in Excel
  • If cell contains one of many things in Excel
  • Calculate conditional mode with criteria in Excel

General

  • Count cells that contain errors in Excel
  • Lock Cells in a Worksheet Excel
  • How to fill cell ranges with random text values in Excel
  • 3D SUMIF for multiple worksheets in Excel
  • Basic numeric sort formula in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning