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
23 July 2026
CA Inter

Vikram Jadhav and Company

Pune

CA Inter

View Details
Company
06 July 2026
Senior Accountant

Arvindkumar Maniar & Co.

Rajkot

CA

View Details
Company
13 July 2026
AVP / VP - PCG Advisory

Workforce Connect

Mumbai

MBA

View Details
Company
ARTICLESHIP 17 July 2026
Article Assistant and B.com pass

BANSAL YOGESH AND CO

Gautam Budh Nagar

B.Com

View Details
Company
ARTICLESHIP 10 July 2026
Article Assistant

N S Gokhale & Co

Thane

CA Inter

View Details
Company
23 July 2026
Semi qualified CA

Garg Bros & Associate CA

New Delhi

CA Inter

View Details
Company
28 July 2026
Senior accountant

RJ Public School

Bengaluru

B.Com

View Details
Company
23 July 2026
Senior Accountant

Felicity Adobe LLP

Bengaluru

CA Inter

View Details
Follow