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

Data Analysis

  • How to sum a total in multiple Excel tables
  • How to count table columns in Excel
  • Number and Text Filters Examples in Excel
  • How To Filter Data in Excel
  • Randomize/ Shuffle List in Excel

References

  • How to get address of last cell in range in Excel
  • Two-way lookup with VLOOKUP in Excel
  • How to get last row in text data in Excel
  • Perform case-sensitive Lookup in Excel
  • Left Lookup in Excel

Data Validations

  • Excel Data validation whole percentage only
  • Excel Data validation require unique number
  • Excel Data validation don’t exceed total
  • Excel Data validation must not contain
  • Excel Data validation number multiple 100

Break ties with helper column and COUNTIF in Excel

by

This tutorial shows how to Break ties with helper column and COUNTIF in Excel using the example below;

Formula

=A1+(COUNTIF(exp_rng,A1)-1)*adjustment

Explanation

To break ties, you can use a helper column and the COUNTIF function to adjust values so that they don’t contain duplicates, and therefore won’t result in ties. In the example shown, the formula in D5 is:

=C5+(COUNTIF($C$5:C5,C5)-1)*0.01

Context

Sometimes, when you use functions like SMALL, LARGE, or RANK to rank highest or lowest values, you end up with ties, because the data contains duplicates. One way to break ties like this is to add a helper column with values that have been adjusted, then rank those values instead of the originals.

In this example, the logic used to adjust values is random – the first duplicate value will “win”, but you can adjust the formula to use logic that fits your particular situation and use case.

How this formula works

At the core, this formula uses the COUNTIF function and an expanding range to count occurrences of values. The expanding reference is used so that COUNTIFS returns a running count of occurrences, instead of a total count for each value:

COUNTIF($C$5:C5,C5)

Next, 1 is subtracted from the result (which makes the count of all non-duplicate values zero) and the result is multiplied by 0.01. This value is the “adjustment”, and intentionally small so as not to materially impact the original value.

In the example shown, Metrolux and Diamond both have the same estimate of $5000. Since Metrolux appears first in the list, the running count of 5000 is 1 and is cancelled out by subtracting 1, so the estimate is remains unchanged in the helper column:

=C8+(COUNTIF($C$5:C8,C8)-1)*0.01
=C8+(1-1)*0.01
=C8+0
=C8

However, for Diamond, the running count of 5000 is 2, so the estimate is adjusted:

=C11+(COUNTIF($C$5:C11,C11)-1)*0.01
=C11+(2-1)*0.01
=C11+1*0.01
=C11+0.01

Finally, the adjusted values are used for ranking instead of the original values in columns G and H.  The formula in G5 is:

=SMALL($D$5:$D$12,F5)

The formula in H5:

=INDEX($B$5:$B$12,MATCH(G5,$D$5:$D$12,0))

Post navigation

Previous Post:

How to use Excel CHOOSE Function

Next Post:

Customize Ribbon 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

  • SWITCH function example in Excel
  • FALSE function: Description, Usage, Syntax, Examples and Explanation
  • Not Equal To ‘<>‘ operator in Excel
  • IF, AND, OR and NOT Functions Examples in Excel
  • How to return blank in place of #DIV/0! error in Excel

Date Time

  • NETWORKDAYS.INTL function: Description, Usage, Syntax, Examples and Explanation
  • MONTH function: Description, Usage, Syntax, Examples and Explanation
  • EDATE function: Description, Usage, Syntax, Examples and Explanation
  • WORKDAY.INTL function: Description, Usage, Syntax, Examples and Explanation
  • Calculate retirement date in Excel

Grouping

  • Group numbers at uneven intervals in Excel
  • How to randomly assign data to groups in Excel
  • Group arbitrary text values in Excel
  • If cell contains one of many things in Excel
  • Running count group by n size in Excel

General

  • Creating and Opening an existing file in Excel
  • How to generate random times at specific intervals in Excel
  • Find, Select, Replace and Go To Special in Excel
  • Split Cell Content Using Text to Columns in Excel
  • Count cells less than in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning