Todays ms excel lesson 01-12-2011 (finding duplicate values)

 

 

An array formula is a formula that works with arrays or series of data rather than single data values. When you enter an array formula, type the formula in the cell and then press CTRL SHIFT ENTER rather than just ENTER when you first enter the formula and when you edit it later. If you do this properly, Excel will display the formula enclosed in curly braces { }.

You can download an example workbook here that illustrates all the formulas on this page.

 

Testing A List For Duplicate Items

The formula below will display the words "Duplicates" or "No Duplicates" indicating whether there are duplicates elements in the list A2:A11.

=IF(MAX(COUNTIF(A2:A11,A2:A11))>1,"Duplicates","No Duplicates")

An alternative formula, one that will work with blank cells in the range, is shown below. Note that the entire formula should be entered in Excel on one line.

=IF(MAX(COUNTIF(INDIRECT("A2:A"&(MAX((A2:A11<>"")*ROW(A2:A11)))),
INDIRECT("A2:A"&(MAX((A2:A11<>"")*ROW(A2:A11))))))>1,"Duplicates","No Duplicates")

 


Highlighting Duplicate Entries

You can use Excel's Conditional Formatting tool to highlight duplicate entries in a list.  All of the examples in this section assume that the data to be tested and highlighted is in the range B2:B11. You should change the cell references to the appropriate values on your worksheet.

HighlightAllDuplicates

This first example will highlight duplicate rows in the range B2:B11. Select the cells that you wish to test and format, B2:B11 in this example. Then, open the Conditional Formatting dialog from the Format menu, change Cell Value Is to Formula Is, enter the formula below, and choose a font or background format to apply to cells that are duplicates.

=COUNTIF($B$2:$B$11,B2)>1

 The formula above, when used in Conditional Formatting, will highlight all duplicates. That is, if the value 'abc' occurs twice in the list, both instances of 'abc' will be highlighted. This is shown in the image to the left, in which all occurrences of 'a' and 'g' are higlighted.

 

 

Click Here to Continue Reading

Replies (1)

gr8 and very helpful post sir... 

Leave a Reply

Your are not logged in . Please login to post replies

Click here to Login / Register  

Company
22 September 2026
Account Assistant

Chirag P Shah & Co. Chartered Accountant

Pune

B.Com

View Details
Company
09 September 2026
SENIOR AUDITOR & ACCOUNTS MANAGER

Anupam Parashar & Co.

Ghaziabad

CA Final

View Details
Company
ARTICLESHIP 30 September 2026
CA Article Assistant

CA Suraj Garg & Associates

New Delhi

CA Final

View Details
Company
16 September 2026
Internal Audit - Team Lead

Consulting & Beyond

Chennai

CA

View Details
Company
19 September 2026
CA/Semi-CA/BCom

Pravin Sarvaiya

Mumbai

CA Inter

View Details
Company
09 September 2026
Chartered Accountant

Aviv Global Private Limited

Ahmedabad

CA

View Details
Company
15 September 2026
Client-site CA associate

Aditya Muley and Co

Mumbai

CA

View Details
Company
ARTICLESHIP 28 September 2026
Junior Accountant

J S P M & Associates LLP

Pune

B.Com

View Details