Find and remove duplicates
Excel for Microsoft 365 Excel 2021 Excel 2019 Excel 2016 Excel 2013 Excel 2010 Excel 2007 Excel Starter 2010 More…Less
Sometimes duplicate data is useful, sometimes it just makes it harder to understand your data. Use conditional formatting to find and highlight duplicate data. That way you can review the duplicates and decide if you want to remove them.
-
Select the cells you want to check for duplicates.
Note: Excel can’t highlight duplicates in the Values area of a PivotTable report.
-
Click Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values.
-
In the box next to values with, pick the formatting you want to apply to the duplicate values, and then click OK.
Remove duplicate values
When you use the Remove Duplicates feature, the duplicate data will be permanently deleted. Before you delete the duplicates, it’s a good idea to copy the original data to another worksheet so you don’t accidentally lose any information.
-
Select the range of cells that has duplicate values you want to remove.
-
Click Data > Remove Duplicates, and then Under Columns, check or uncheck the columns where you want to remove the duplicates.
For example, in this worksheet, the January column has price information I want to keep.
So, I unchecked January in the Remove Duplicates box.
-
Click OK.
Note: The counts of duplicate and unique values given after removal may include empty cells, spaces, etc.
Need more help?
Need more help?
It’s often better to duplicate an existing sheet instead, and there’s a quick shortcut that can help with this. Simply hold down the Ctrl key, then click and drag the sheet’s tab. When you release the mouse, Excel will create an exact copy of the sheet.
Contents
- 1 How do you duplicate items in Excel?
- 2 How do you automatically duplicate cells in Excel?
- 3 What is Ctrl D in Excel?
- 4 How do I duplicate a column in Excel?
- 5 How do I copy the same text in Excel?
- 6 What is Vlookup in Excel?
- 7 What is Ctrl M in Excel?
- 8 What does F9 do in Excel?
- 9 How do I find duplicates in Excel without deleting them?
- 10 How do I duplicate a column?
- 11 How do I copy one cell into multiple cells?
- 12 How do I paste one thing into multiple cells?
- 13 How do you do a VLOOKUP for beginners?
- 14 How do I match data from two Excel spreadsheets?
- 15 How use VLOOKUP step by step?
- 16 What is Ctrl Q used for?
- 17 What is Ctrl N in Excel?
- 18 What is Ctrl P in Excel?
- 19 What does Alt F5 do in Excel?
- 20 What does Alt R do?
How do you duplicate items in Excel?
Press CTRL+D and your formula is duplicated into each cell in your selection. Duplicating like this only works from top to bottom, so whatever is in the top-most cell of your selection is duplicated.
How do you automatically duplicate cells in Excel?
You can use formula to copy and paste cell automatically. Please do as follows. 1. For copying and pasting cell in current sheet such as copy cell A1 to D5, you can just select the destination cell D5, then enter =A1 and press the Enter key to get the A1 value.
What is Ctrl D in Excel?
Ctrl+D in Excel and Google Sheets
In Microsoft Excel and Google Sheets, pressing Ctrl + D fills and overwrites a cell(s) with the contents of the cell above it in a column. To fill the entire column with the contents of the upper cell, press Ctrl + Shift + Down to select all cells below, and then press Ctrl + D .
How do I duplicate a column in Excel?
How to Copy and Paste Columns in Excel
- Step 1: highlight the column or cells you want to copy and paste.
- Step 2: Press Ctrl + C to copy column.
- Step 3: Press Ctrl + V to paste.
How do I copy the same text in Excel?
Copy Same Value in Multiple Cells
- Select the range of Cells.
- And enter required text to have in the Cells (this will be keyed in active cell)
- Press Ctrl+ Enter keys to repeat the same text in multiple cells in Excel.
What is Vlookup in Excel?
VLOOKUP stands for ‘Vertical Lookup’. It is a function that makes Excel search for a certain value in a column (the so called ‘table array’), in order to return a value from a different column in the same row.
What is Ctrl M in Excel?
In Microsoft Word and other word processor programs, pressing Ctrl + M indents the paragraph. If you press this keyboard shortcut more than once, it continues to indent further. For example, you could hold down the Ctrl and press M three times to indent the paragraph by three units.
What does F9 do in Excel?
F9. Calculates the workbook. By default, any time you change a value, Excel automatically calculates the workbook. Turn on Manual calculation (on the Formulas tab, in the Calculation group, click Calculations Options, Manual) and change the value in cell A1 from 5 to 6.
How do I find duplicates in Excel without deleting them?
If you simply want to find duplicates, so you can decide yourself whether or not to delete them, your best bet is highlighting all duplicate content using conditional formatting. Select the columns you want to check for duplicate information, and click Home > Highlight Cell Rules > Duplicate Values.
How do I duplicate a column?
Follow these steps to move or copy cells: Select the cell, row, or column that you want to move or copy. Keyboard shortcut: Press CTRL+X. Keyboard shortcut: Press CTRL+C.
How do I copy one cell into multiple cells?
Copy and Paste Cells (within a Sheet or Between Sheets)
To copy a cell, right-click and select Copy. To include multiple cells, click on one, and without releasing the click, drag your mouse around adjacent cells to highlight them before copying.
How do I paste one thing into multiple cells?
Insert the same data into multiple cells using Ctrl+Enter
Select all the blank cells in a column. Press Ctrl+Enter instead of Enter. All the selected cells will be filled with the data that you typed.
How do you do a VLOOKUP for beginners?
- In the Formula Bar, type =VLOOKUP().
- In the parentheses, enter your lookup value, followed by a comma.
- Enter your table array or lookup table, the range of data you want to search, and a comma: (H2,B3:F25,
- Enter column index number.
- Enter the range lookup value, either TRUE or FALSE.
How do I match data from two Excel spreadsheets?
How to use the Compare Sheets wizard
- Step 1: Select your worksheets and ranges. In the list of open books, choose the sheets you are going to compare.
- Step 2: Specify the comparing mode.
- Step 3: Select the key columns (if there are any)
- Step 4: Choose your comparison options.
How use VLOOKUP step by step?
How to use VLOOKUP in Excel
- Step 1: Organize the data.
- Step 2: Tell the function what to lookup.
- Step 3: Tell the function where to look.
- Step 4: Tell Excel what column to output the data from.
- Step 5: Exact or approximate match.
What is Ctrl Q used for?
Also referred to as Control Q and C-q, Ctrl+Q is a shortcut key that varies depending on the program being used. In Microsoft Word, Ctrl+Q is used to remove the paragraph’s formatting. In many programs, the Ctrl+Q key may be used to quit the program or close the programs window.
What is Ctrl N in Excel?
Ctrl+N: Create a new workbook. Ctrl+O: Open an existing workbook. Ctrl+S: Save a workbook. F12: Open the Save As dialog box. Ctrl+W: Close a workbook.
What is Ctrl P in Excel?
Alternatively referred to as Control+P and C-p, Ctrl+P is a keyboard shortcut most often used to print a document or page.Ctrl+P in Excel and other spreadsheet programs.
What does Alt F5 do in Excel?
h) Alt + Ctrl + Shift + F4: “Alt + Ctrl + Shift + F4” keys closes all open Excel file i.e. these work similar to “Alt + F4” keys. “F5” key is used to display “Go To” dialog box; it will help you in viewing named range. This will restore windows size of the current excel workbook.
What does Alt R do?
Alt+R is a keyboard shortcut most often used to open the Review tab in the Office programs Ribbon.
Duplicate Values | Triplicates | Duplicate Rows
This example teaches you how to find duplicate values (or triplicates) and how to find duplicate rows in Excel.
Duplicate Values
To find and highlight duplicate values in Excel, execute the following steps.
1. Select the range A1:C10.
2. On the Home tab, in the Styles group, click Conditional Formatting.
3. Click Highlight Cells Rules, Duplicate Values.
4. Select a formatting style and click OK.
Result. Excel highlights the duplicate names.
Note: select Unique from the first drop-down list to highlight the unique names.
Triplicates
By default, Excel highlights duplicates (Juliet, Delta), triplicates (Sierra), etc. (see previous image). Execute the following steps to highlight triplicates only.
1. First, clear the previous conditional formatting rule.
2. Select the range A1:C10.
3. On the Home tab, in the Styles group, click Conditional Formatting.
4. Click New Rule.
5. Select ‘Use a formula to determine which cells to format’.
6. Enter the formula =COUNTIF($A$1:$C$10,A1)=3
7. Select a formatting style and click OK.
Result. Excel highlights the triplicate names.
Explanation: =COUNTIF($A$1:$C$10,A1) counts the number of names in the range A1:C10 that are equal to the name in cell A1. If COUNTIF($A$1:$C$10,A1) = 3, Excel formats cell A1. Always write the formula for the upper-left cell in the selected range (A1:C10). Excel automatically copies the formula to the other cells. Thus, cell A2 contains the formula =COUNTIF($A$1:$C$10,A2)=3, cell A3 =COUNTIF($A$1:$C$10,A3)=3, etc. Notice how we created an absolute reference ($A$1:$C$10) to fix this reference.
Note: you can use any formula you like. For example, use this formula =COUNTIF($A$1:$C$10,A1)>3 to highlight names that occur more than 3 times.
Duplicate Rows
To find and highlight duplicate rows in Excel, use COUNTIFS (with the letter S at the end) instead of COUNTIF.
1. Select the range A1:C10.
2. On the Home tab, in the Styles group, click Conditional Formatting.
3. Click New Rule.
4. Select ‘Use a formula to determine which cells to format’.
5. Enter the formula =COUNTIFS(Animals,$A1,Continents,$B1,Countries,$C1)>1
6. Select a formatting style and click OK.
Note: the named range Animals refers to the range A1:A10, the named range Continents refers to the range B1:B10 and the named range Countries refers to the range C1:C10. =COUNTIFS(Animals,$A1,Continents,$B1,Countries,$C1) counts the number of rows based on multiple criteria (Leopard, Africa, Zambia).
Result. Excel highlights the duplicate rows.
Explanation: if COUNTIFS(Animals,$A1,Continents,$B1,Countries,$C1) > 1, in other words, if there are multiple (Leopard, Africa, Zambia) rows, Excel formats cell A1. Always write the formula for the upper-left cell in the selected range (A1:C10). Excel automatically copies the formula to the other cells. We fixed the reference to each column by placing a $ symbol in front of the column letter ($A1, $B1 and $C1). As a result, cell A1, B1 and C1 contain the same formula, cell A2, B2 and C2 contain the formula =COUNTIFS(Animals,$A2,Continents,$B2,Countries,$C2)>1, etc.
7. Finally, you can use the Remove Duplicates tool in Excel to quickly remove duplicate rows. On the Data tab, in the Data Tools group, click Remove Duplicates.
In the example below, Excel removes all identical rows (blue) except for the first identical row found (yellow).
Note: visit our page about removing duplicates to learn more about this great Excel tool.
Содержание
- Find and remove duplicates
- Remove duplicate values
- Need more help?
- How to compare data in two columns to find duplicates in Excel
- Method 1: Use a worksheet formula
- Method 2: Use a Visual Basic macro
- Filter for unique values or remove duplicate values
- Remove duplicate values
- Need more help?
- Find Duplicates
- Duplicate Values
- Triplicates
- Duplicate Rows
Find and remove duplicates
Sometimes duplicate data is useful, sometimes it just makes it harder to understand your data. Use conditional formatting to find and highlight duplicate data. That way you can review the duplicates and decide if you want to remove them.
Select the cells you want to check for duplicates.
Note: Excel can’t highlight duplicates in the Values area of a PivotTable report.
Click Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values.
In the box next to values with, pick the formatting you want to apply to the duplicate values, and then click OK .
Remove duplicate values
When you use the Remove Duplicates feature, the duplicate data will be permanently deleted. Before you delete the duplicates, it’s a good idea to copy the original data to another worksheet so you don’t accidentally lose any information.
Select the range of cells that has duplicate values you want to remove.
Tip: Remove any outlines or subtotals from your data before trying to remove duplicates.
Click Data > Remove Duplicates, and then Under Columns, check or uncheck the columns where you want to remove the duplicates.
For example, in this worksheet, the January column has price information I want to keep.
So, I unchecked January in the Remove Duplicates box.
Note: The counts of duplicate and unique values given after removal may include empty cells, spaces, etc.
Need more help?
Источник
How to compare data in two columns to find duplicates in Excel
You can use the following methods to compare data in two Microsoft Excel worksheet columns and find duplicate entries.
Method 1: Use a worksheet formula
In a new worksheet, enter the following data as an example (leave column B empty):
Type the following formula in cell B1:
Select cell B1 to B5.
In Excel 2007 and later versions of Excel, select Fill in the Editing group, and then select Down.
The duplicate numbers are displayed in column B, as in the following example:
Method 2: Use a Visual Basic macro
Warning: Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure. However, they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
To use a Visual Basic macro to compare the data in two columns, use the steps in the following example:
Press ALT+F11 to start the Visual Basic editor.
On the Insert menu, select Module.
Enter the following code in a module sheet:
Press ALT+F11 to return to Excel.
Enter the following data as an example (leave column B empty):
Источник
Filter for unique values or remove duplicate values
In Excel, there are several ways to filter for unique values—or remove duplicate values:
To filter for unique values, click Data > Sort & Filter > Advanced.
To remove duplicate values, click Data > Data Tools > Remove Duplicates.
To highlight unique or duplicate values, use the Conditional Formatting command in the Style group on the Home tab.
Filtering for unique values and removing duplicate values are two similar tasks, since the objective is to present a list of unique values. There is a critical difference, however: When you filter for unique values, the duplicate values are only hidden temporarily. However, removing duplicate values means that you are permanently deleting duplicate values.
A duplicate value is one in which all values in at least one row are identical to all of the values in another row. A comparison of duplicate values depends on the what appears in the cell—not the underlying value stored in the cell. For example, if you have the same date value in different cells, one formatted as «3/8/2006» and the other as «Mar 8, 2006», the values are unique.
Check before removing duplicates: Before removing duplicate values, it’s a good idea to first try to filter on—or conditionally format on—unique values to confirm that you achieve the results you expect.
Follow these steps:
Select the range of cells, or ensure that the active cell is in a table.
Click Data > Advanced (in the Sort & Filter group).
In the Advanced Filter popup box, do one of the following:
To filter the range of cells or table in place:
Click Filter the list, in-place.
To copy the results of the filter to another location:
Click Copy to another location.
In the Copy to box, enter a cell reference.
Alternatively, click Collapse Dialog to temporarily hide the popup window, select a cell on the worksheet, and then click Expand .
Check the Unique records only, then click OK.
The unique values from the range will copy to the new location.
When you remove duplicate values, the only effect is on the values in the range of cells or table. Other values outside the range of cells or table will not change or move. When duplicates are removed, the first occurrence of the value in the list is kept, but other identical values are deleted.
Because you are permanently deleting data, it’s a good idea to copy the original range of cells or table to another worksheet or workbook before removing duplicate values.
Follow these steps:
Select the range of cells, or ensure that the active cell is in a table.
On the Data tab, click Remove Duplicates (in the Data Tools group).
Do one or more of the following:
Under Columns, select one or more columns.
To quickly select all columns, click Select All.
To quickly clear all columns, click Unselect All.
If the range of cells or table contains many columns and you want to only select a few columns, you may find it easier to click Unselect All, and then under Columns, select those columns.
Note: Data will be removed from all columns, even if you don’t select all the columns at this step. For example, if you select Column1 and Column2, but not Column3, then the “key” used to find duplicates is the value of BOTH Column1 & Column2. If a duplicate is found in those columns, then the entire row will be removed, including other columns in the table or range.
Click OK, and a message will appear to indicate how many duplicate values were removed, or how many unique values remain. Click OK to dismiss this message.
Undo the change by click Undo (or pressing Ctrl+Z on the keyboard).
You cannot remove duplicate values from outline data that is outlined or that has subtotals. To remove duplicates, you must remove both the outline and the subtotals. For more information, see Outline a list of data in a worksheet and Remove subtotals.
Note: You cannot conditionally format fields in the Values area of a PivotTable report by unique or duplicate values.
Follow these steps:
Select one or more cells in a range, table, or PivotTable report.
On the Home tab, in the Style group, click the small arrow for Conditional Formatting, and then click Highlight Cells Rules, and select Duplicate Values.
Enter the values that you want to use, and then choose a format.
Follow these steps:
Select one or more cells in a range, table, or PivotTable report.
On the Home tab, in the Styles group, click the arrow for Conditional Formatting, and then click Manage Rules to display the Conditional Formatting Rules Manager popup window.
Do one of the following:
To add a conditional format, click New Rule to display the New Formatting Rule popup window.
To change a conditional format, begin by ensuring that the appropriate worksheet or table has been chosen in the Show formatting rules for list. If necessary, choose another range of cells by clicking Collapse button in the Applies to popup window temporarily hide it. Choose a new range of cells on the worksheet, then expand the popup window again . Select the rule, and then click Edit rule to display the Edit Formatting Rule popup window.
Under Select a Rule Type, click Format only unique or duplicate values.
In the Format all list of Edit the Rule Description, choose either unique or duplicate.
Click Format to display the Format Cells popup window.
Select the number, font, border, or fill format that you want to apply when the cell value satisfies the condition, and then click OK. You can choose more than one format. The formats that you select are displayed in the Preview panel.
In Excel for the web, you can remove duplicate values.
Remove duplicate values
When you remove duplicate values, the only effect is on the values in the range of cells or table. Other values outside the range of cells or table will not change or move. When duplicates are removed, the first occurrence of the value in the list is kept, but other identical values are deleted.
Important: You can always click Undo to get back your data after you have removed the duplicates. That being said, it’s a good idea to copy the original range of cells or table to another worksheet or workbook before removing duplicate values.
Follow these steps:
Select the range of cells, or ensure that the active cell is in a table.
On the Data tab, click Remove Duplicates .
In the Remove Duplicates dialog box, unselect any columns where you don’t want to remove duplicate values.
Note: Data will be removed from all columns, even if you don’t select all the columns at this step. For example, if you select Column1 and Column2, but not Column3, then the “key” used to find duplicates is the value of BOTH Column1 & Column2. If a duplicate is found in Column1 and Column2, then the entire row will be removed, including data from Column3.
Click OK, and a message will appear to indicate how many duplicate values were removed. Click OK to dismiss this message.
Note: If you want to get back your data, simply click Undo (or press Ctrl+Z on the keyboard).
Need more help?
You can always ask an expert in the Excel Tech Community or get support in the Answers community.
Источник
Find Duplicates
This example teaches you how to find duplicate values (or triplicates) and how to find duplicate rows in Excel.
Duplicate Values
To find and highlight duplicate values in Excel, execute the following steps.
1. Select the range A1:C10.
2. On the Home tab, in the Styles group, click Conditional Formatting.
3. Click Highlight Cells Rules, Duplicate Values.
4. Select a formatting style and click OK.
Result. Excel highlights the duplicate names.
Note: select Unique from the first drop-down list to highlight the unique names.
Triplicates
By default, Excel highlights duplicates (Juliet, Delta), triplicates (Sierra), etc. (see previous image). Execute the following steps to highlight triplicates only.
1. First, clear the previous conditional formatting rule.
2. Select the range A1:C10.
3. On the Home tab, in the Styles group, click Conditional Formatting.
4. Click New Rule.
5. Select ‘Use a formula to determine which cells to format’.
6. Enter the formula =COUNTIF($A$1:$C$10,A1)=3
7. Select a formatting style and click OK.
Result. Excel highlights the triplicate names.
Explanation: =COUNTIF($A$1:$C$10,A1) counts the number of names in the range A1:C10 that are equal to the name in cell A1. If COUNTIF($A$1:$C$10,A1) = 3, Excel formats cell A1. Always write the formula for the upper-left cell in the selected range (A1:C10). Excel automatically copies the formula to the other cells. Thus, cell A2 contains the formula =COUNTIF($A$1:$C$10,A2)=3, cell A3 =COUNTIF($A$1:$C$10,A3)=3, etc. Notice how we created an absolute reference ($A$1:$C$10) to fix this reference.
Note: you can use any formula you like. For example, use this formula =COUNTIF($A$1:$C$10,A1)>3 to highlight names that occur more than 3 times.
Duplicate Rows
To find and highlight duplicate rows in Excel, use COUNTIFS (with the letter S at the end) instead of COUNTIF.
1. Select the range A1:C10.
2. On the Home tab, in the Styles group, click Conditional Formatting.
3. Click New Rule.
4. Select ‘Use a formula to determine which cells to format’.
5. Enter the formula =COUNTIFS(Animals,$A1,Continents,$B1,Countries,$C1)>1
6. Select a formatting style and click OK.
Note: the named range Animals refers to the range A1:A10, the named range Continents refers to the range B1:B10 and the named range Countries refers to the range C1:C10. =COUNTIFS(Animals,$A1,Continents,$B1,Countries,$C1) counts the number of rows based on multiple criteria (Leopard, Africa, Zambia).
Result. Excel highlights the duplicate rows.
Explanation: if COUNTIFS(Animals,$A1,Continents,$B1,Countries,$C1) > 1, in other words, if there are multiple (Leopard, Africa, Zambia) rows, Excel formats cell A1. Always write the formula for the upper-left cell in the selected range (A1:C10). Excel automatically copies the formula to the other cells. We fixed the reference to each column by placing a $ symbol in front of the column letter ($A1, $B1 and $C1). As a result, cell A1, B1 and C1 contain the same formula, cell A2, B2 and C2 contain the formula =COUNTIFS(Animals,$A2,Continents,$B2,Countries,$C2)>1 , etc.
7. Finally, you can use the Remove Duplicates tool in Excel to quickly remove duplicate rows. On the Data tab, in the Data Tools group, click Remove Duplicates.
In the example below, Excel removes all identical rows (blue) except for the first identical row found (yellow).
Note: visit our page about removing duplicates to learn more about this great Excel tool.
Источник
Watch Video – How to Find and Remove Duplicates in Excel
With a lot of data…comes a lot of duplicate data.
Duplicates in Excel can cause a lot of troubles. Whether you import data from a database, get it from a colleague, or collate it yourself, duplicates data can always creep in. And if the data you are working with is huge, then it becomes really difficult to find and remove these duplicates in Excel.
In this tutorial, I’ll show you how to find and remove duplicates in Excel.
CONTENTS:
- FIND and HIGHLIGHT Duplicates in Excel.
- Find and Highlight Duplicates in a Single Column.
- Find and Highlight Duplicates in Multiple Columns.
- Find and Highlight Duplicate Rows.
- REMOVE Duplicates in Excel.
- Remove Duplicates from a Single Column.
- Remove Duplicates from Multiple Columns.
- Remove Duplicate Rows.
Find and Highlight Duplicates in Excel
Duplicates in Excel can come in many forms. You can have it in a single column or multiple columns. There may also be a duplication of an entire row.
Finding and Highlight Duplicates in a Single Column in Excel
Conditional Formatting makes it simple to highlight duplicates in Excel.
Here is how to do it:
- Select the data in which you want to highlight the duplicates.
- Go to Home –> Conditional Formatting –> Highlight Cell Rules –> Duplicate Values.
- In the Duplicate Values dialog box, select Duplicate in the drop down on the left, and specify the format in which you want to highlight the duplicate values. You can choose from the ready-made format options (in the drop down on the right), or specify your own format.
- This will highlight all the values that have duplicates.
Quick Tip: Remember to check for leading or trailing spaces. For example, “John” and “John ” are considered different as the latter has an extra space character in it. A good idea would be to use the TRIM function to clean your data.
Finding and Highlight Duplicates in Multiple Columns in Excel
If you have data that spans multiple columns and you need to look for duplicates in it, the process is exactly the same as above.
Here is how to do it:
- Select the data.
- Go to Home –> Conditional Formatting –> Highlight Cell Rules –> Duplicate Values.
- In the Duplicate Values dialog box, select Duplicate in the drop down on the left, and specify the format in which you want to highlight the duplicate values.
- This will highlight all the cells that have duplicates value in the selected data set.
Finding and Highlighting Duplicate Rows in Excel
Finding duplicate data and finding duplicate rows of data are 2 different things. Have a look:
Finding duplicate rows is a bit more complex than finding duplicate cells.
Here are the steps:
- In an adjacent column, use the following formula:
=A2&B2&C2&D2
Drag this down for all the rows. This formula combines all the cell values as a single string. (You can also use the CONCATENATE function to combine text strings)
By doing this, we have created a single string for each row. If there are duplicate rows in this dataset, then these strings would be exactly the same for it.
Now that we have the combined strings for each row, we can use conditional formatting to highlight duplicate strings. A highlighted string implies that the row has a duplicate.
Here are the steps to highlight duplicate strings:
- Select the range that has the combined strings (E2:E16 in this example).
- Go to Home –> Conditional Formatting –> Highlight Cell Rules –> Duplicate Values.
- In the Duplicate Values dialog box, make sure Duplicate is selected and then specify the color in which you want to highlight the duplicate values.
This would highlight the duplicate values in column E.
In the above approach, we have highlighted only the strings that we created.
But what if you want to highlight all the duplicate rows (instead of highlighting cells in one single column)?
Here are the steps to highlight duplicate rows:
- In an adjacent column, use the following formula:
=A2&B2&C2&D2
Drag this down for all the rows. This formula combines all the cell values as a single string.
- Select the data A2:D16.
- With the data selected, go to Home –> Conditional Formatting –> New Rule.
- In the ‘New Formatting Rule’ dialog box, click on ‘Use a formula to determine which cells to format’.
- In the field below, use the following COUNTIF function:
=COUNTIF($E$2:$E$16,$E2)>1
- Select the format and click OK.
This formula would highlight all the rows that have a duplicate.
Remove Duplicates in Excel
In the above section, we learned how to find and highlight duplicates in excel. In this section, I will show you how to get rid of these duplicates.
Remove Duplicates from a Single Column in Excel
If you have the data in a single column and you want to remove all the duplicates, here are the steps:
- Select the data.
- Go to Data –> Data Tools –> Remove Duplicates.
- In the Remove Duplicates dialog box:
- If your data has headers, make sure the ‘My data has headers’ option is checked.
- Make sure the column is selected (in this case there is only one column).
- Click OK.
This would remove all the duplicate values from the column, and you would have only the unique values.
CAUTION: This alters your data set by removing duplicates. Make sure you have a back-up of the original data set. If you want to extract the unique values at some other location, copy this dataset to that location and then use the above-mentioned steps. Alternatively, you can also use Advanced Filter to extract unique values to some other location.
Remove Duplicates from Multiple Columns in Excel
Suppose you have the data as shown below:
In the above data, row #2 and #16 have the exact same data for Sales Rep, Region, and Amount, but different dates (same is the case with row #10 and #13). This could be an entry error where the same entry has been recorded twice with different dates.
To delete the duplicate row in this case:
- Select the data.
- Go to Data –> Data Tools –> Remove Duplicates.
- In the Remove Duplicates dialog box:
- If your data has headers, make sure the ‘My data has headers’ option is checked.
- Select all the columns except the Date column.
- Click OK.
This would remove the 2 duplicate entries.
NOTE: This keeps the first occurrence and removes all the remaining duplicate occurrences.
Remove Duplicate Rows in Excel
To delete duplicate rows, here are the steps:
- Select the entire data.
- Go to Data –> Data Tools –> Remove Duplicates.
- In the Remove Duplicates dialog box:
- If your data has headers, make sure the ‘My data has headers’ option is checked.
- Select all the columns.
- Click OK.
Use the above-mentioned techniques to clean your data and get rid of duplicates.
You May Also Like the Following Excel Tutorials:
- 10 Ways to Clean Data in Excel Spreadsheets.
- Remove Leading and Trailing Spaces in Excel.
- 24 Daily Excel Issues and their Quick Fixes.
- How to Find Merged Cells in Excel.
See all How-To Articles
This tutorial shows how to duplicate rows in Excel and Google Sheets.
Duplicate Rows – Copy and Paste
The easiest way to copy rows exactly is to use Excel’s Copy and Paste functionality. If you’re starting with duplicate rows and want to remove them, see this page.
Say you have the following data set and want to copy Row 7 to Row 8.
- Select the row you want to copy by clicking on a row number (here, Row 7), then right-click anywhere in the selected area and choose Copy (or use the keyboard shortcut CTRL + C).
- Right-click the row number where you want to paste the copied row and click Paste (or use the keyboard shortcut CTRL + V).
As a result, the entire Row 7 is copied to Row 8.
To use copy and paste to duplicate a whole row within a macro, see VBA Copy / Paste Rows & Columns.
Copy a Row to Multiple Rows
You can also copy one row and paste it into multiple rows. For example, follow these steps to copy Row 7 to Rows 8–10:
- Select the row you want to copy by clicking on a row number (Row 7). Then right-click anywhere in the selected area and choose Copy (or use the keyboard shortcut CTRL + C).
- Select the row numbers where you want to paste copied row, then right-click anywhere in the selected area, and choose Paste (or use the keyboard shortcut CTRL + V).
As a result, Row 7 is now copied to Rows 8–10.
Duplicate Rows With the Fill Handle
You can also duplicate rows using the fill handle.
- Select the row you want to copy, and position the cursor in the bottom-left corner of the selection range until the small black cross appears (the Fill Handle).
- Then drag the cursor down to the next row (or to multiple rows, depending on the number of duplicates you want).
The result is exactly the same as demonstrated with the copy and paste method above.
Duplicate Rows in Google Sheets
You can use any of the options above in exactly the same way in Google Sheets to duplicate rows.
In MS Excel, the duplicate values can be found and removed from a data set. Depending on your data and requirement, the most commonly used methods are the conditional formatting feature or the COUNTIF formula to find and highlight the duplicates for a specific number of occurences. The columns of the data set can be then filtered to view the duplicate values.
In this article, we will look at 5 different methods to check, identify, and delete duplicates in Excel.
Table of contents
- How to Find Duplicates in Excel?
- 5 Methods to Check & Identify Duplicates in Excel
- #1 – Conditional Formatting
- #2 – Conditional Formatting (Specific Occurrence)
- #3 – Change Rules (Formulas)
- #4 – Remove Duplicates
- #5 – COUNTIF Formula
- Frequently Asked Questions
- Recommended Articles
- 5 Methods to Check & Identify Duplicates in Excel
5 Methods to Check & Identify Duplicates in Excel
You can download this Find for Duplicates Excel Template here – Find for Duplicates Excel Template
#1 – Conditional Formatting
The conditional formattingConditional formatting is a technique in Excel that allows us to format cells in a worksheet based on certain conditions. It can be found in the styles section of the Home tab.read more feature is available in Excel 2007 and subsequent versions.
The following table consists of the expenses incurred on availing certain office facilities. The corresponding dates of purchasing such facility are also listed.
We want to identify the duplicates in excel with the help of conditional formatting.
The steps to find the duplicates in excel with the help of conditional formatting are listed as follows:
- Select the data range (A1:C13) where duplicates are to be found.
- In the Home tab, select “conditional formatting” from the “styles” section. From the drop-down menu, select “highlight cell rules” and click on “duplicate values.”
- The pop-up window titled “duplicate values” appears. In the first box on the left side, select “duplicate.” In the “values with” drop-down, select the required color to highlight the duplicate cells. Click “Ok.”
- The duplicate cells are highlighted in the data table, as shown in the following image.
- The columns can be filtered to identify the duplicate values. For this, right-click the required column and select “filter by selected cell’s color.” The data is filtered for duplicates.
- The result after applying the filter to the first column (office supplies) is shown in the following image.
#2 – Conditional Formatting (Specific Occurrence)
Let us consider an example to identify the specific number of duplications. In the following table, we want to check and show the duplicate values with three occurrences.
The steps to find the duplicate values for specific number of occurrences are listed as follows:
Step 1: Select the range A2:C8 in the given data table.
Step 2: In the Home tab, select “conditional formatting” from the “styles” section. Click “new rule.”
Note: The “new rule” option helps highlight a specific count of duplicates using the COUNTIF formula.
Step 3: The pop-up window titled “new formatting rule” appears. Enter the following details, as shown in the succeeding image.
- Under “select a rule type,” select “use a formula to determine which cells to format.”
- Under “edit the rule description,” enter the COUNTIFThe COUNTIF function in Excel counts the number of cells within a range based on pre-defined criteria. It is used to count cells that include dates, numbers, or text. For example, COUNTIF(A1:A10,”Trump”) will count the number of cells within the range A1:A10 that contain the text “Trump”
read more formula.
The COUNTIF formula “=COUNTIF(cell range of the data table, cell criteria)” finds and highlights the cells for the desired number of occurrences.
In this case, the COUNTIF formula highlights duplicate cells having triplicate count. This count can be changed to a greater number. The conditions can also be changed depending on the user’s requirement.
Step 4: Once the COUNTIF formula is entered, click “format.” The pop-up window titled “format cells” opens. Select the font style “regular.”
Step 5: In the “fill” tab, select blue color. The “fill” tab helps highlight the duplicate cellsHighlight Cells Rule, which is available under Conditional Formatting under the Home menu tab, can be used to highlight duplicate values in the selected dataset, whether it is a column or row of a table.read more.
Step 6: Once the selections in “format cells” window are complete, click “Ok.” Click “Ok” again in the “new formatting rule” window.
Step 7: The result is displayed in the following image. The duplicate cells with three occurrences are highlighted.
#3 – Change Rules (Formulas)
Working on the data of example #2, let us understand the procedure of changing the formula. For applying new formulas, the existing rules (formulas) of the data tableA data table in excel is a type of what-if analysis tool that allows you to compare variables and see how they impact the result and overall data. It can be found under the data tab in the what-if analysis section.read more have to be cleared.
The steps to clear the existing rules (shown in the succeeding image) are listed as follows:
Step 1: In the Home tab, select “conditional formatting” from the “styles” section.
Step 2: In “clear rules” option, select either of the following:
- Clear rules from selected cells–This resets the rules for the selected range of the table. So, prior to clearing the rules, the data needs to be selected.
- Clear rules from entire sheet–This clears the rules for the entire sheet.
The blue highlighted cells disappear and the original table is displayed.
#4 – Remove Duplicates
Let us check and delete duplicate values from a selected range. Prior to deletion, keeping a copy of the table is advisable because the duplicates will be permanently deleted.
The following table displays a series of items with their corresponding IDs.
The steps to find and delete duplicate values are listed as follows:
Step 1: Select the range of the table whose duplicates are required to be deleted.
Step 2: In the Data tab, select “remove duplicates” from the “data tools” section.
Note: The “remove duplicates” option helps eliminate duplicates and retain unique cell values.
Step 3: The pop-up window titled “remove duplicates” appears, as shown in the succeeding image. By default, the following options are already selected:
- The checkboxes for both the headers (“order ID” and “items”)
- The “select all” box
Since the table consists of column headers, select the checkbox “my data has headers.” Click “Ok” to execute.
Note: To change the number of columns selected, click “unselect all.” Following this, the desired columns from which the duplicates are to be deleted can be selected.
Step 4: The result is shown in the succeeding image. A prompt is displayed which states the following details:
- The number of duplicate values removed from the table
- The number of unique values that remain in the table after deletion
Click “Ok.” Hence, the duplicate values along with their corresponding rows are deleted.
#5 – COUNTIF Formula
The following table displays the names of a few countries. We want to identify the duplicate values using the COUNTIF function.
The COUNTIF function requires the range (column containing duplicate entries) and the cell criteria. It returns the number of corresponding duplicates for every cell.
The steps to find the duplicate values in excel with the help of the COUNTIF function are listed as follows:
Step 1: Enter the formula shown in the succeeding image. Press the “Enter” key.
Note: The range must be fixed with the dollar ($) sign. Otherwise, the cell reference will change on dragging the formula.
Step 2: Drag the formula till the end of the table with the help of the fill handle. Alternatively, place the cursor on cell B2 and double-click the fill handle. The fill handle appears at the lower right corner of cell B2.
Step 3: The output of the formula is shown in the following image. It returns the count of duplicates for the entire data set.
Note: The filter can be applied to the column header to view the occurrences greater than one.
Frequently Asked Questions
1. What does it mean to find duplicates in Excel?
While consolidating different worksheets, several duplicates may be found in a data set. MS Excel helps to find and highlight such duplicates. It is also possible to filter a column for duplicate values.
An easy way to search for duplicates is by using the COUNTIF formula. This formula can count the total number of duplicates in a column. It can also count the number of individual instances of a particular duplicate entry. It accepts two arguments–the range and the criteria.
2. How to find duplicates in a column of Excel?
To check a column for duplicates, the formula is given as follows:
“=COUNTIF(A:A,A2)>1”
The formula checks for duplicates in column A. The topmost cell is A2. For every duplicate value, the formula returns “true.” For every unique value, the formula returns “false.”
Note: For an output other than “true” and “false,” the COUNTIF formula can be enclosed in the IF function.
3. What is the formula to find duplicates in Excel?
The generic formula to find the exact, case-sensitive duplicate values is stated as follows:
“IF(SUM((-EXACT(range,uppermost_cell)))<=1,””,”Duplicate”)”
The EXACT function compares the cell range with the target cell. The SUM function adds the number of instances. If the occurrence is greater than 1, the IF function returns “duplicate.”
Note 1: Since it is an array formula, it should be entered using “Ctrl+Shift+Enter.”
Note 2: If the same word appears twice in lowercase and once in uppercase, the formula will not count the uppercase word as duplicate.
Recommended Articles
This has been a guide to Find Duplicates in Excel. Here we discuss how to identify, check and show duplicates in excel with examples. You may also look at these useful functions in Excel –
- How to Use IF Formula in Excel (with Examples)?
- Conditional Formatting for Blank Cells | Steps
- Create a Dashboard in Excel
- Apply Conditional Formatting in Pivot Table
Working with spreadsheets often involves a lot of repetitive tasks.
A common way that spreadsheet users save time and energy is by making copies of spreadsheets already created and using those after making the necessary edits.
In this way, you get to keep the structure and format of the original sheet, while only changing the things that need to be changed.
With Excel, making duplicates of sheets is very simple and quick. Moreover, there are multiple ways in which you can duplicate sheets. In this tutorial, we will see 3 quick ways to duplicate a sheet in Excel.
We will also see how you can make duplicates of multiple sheets as well as how you can make multiple duplicates of a single sheet.
3 ways to Duplicate One or Multiple Sheets in Excel
First, let us look at how you can make duplicates of one or more sheets in Excel.
There are three ways to do this.
Let us look at each of these methods one by one. For each of the methods, we will use the set of worksheets shown below:
Using the Format Menu to Duplicate a Sheet in Excel
Let’s say “Sheet 1” is the currently active sheet. To make a duplicate of the sheet, follow the steps given below:
- Select the Home tab.
- Click on the Format button (under the Cells group).
- From the drop-down menu that appears, select the ‘Move or Copy Sheet’ option.
- This will open the Move or Copy dialog box.
- Make sure the checkbox next to Create a Copy’ is checked.
- Select where you want the duplicate sheet to go. The options you have are:
- In a different workbook – For this, select the dropdown list below ‘To book:’ and select the workbook you want to copy the sheet to. If you want the duplicate sheet to go into a new workbook, select the ‘new book’ option.
- Before a particular sheet’s tab – For this, from the list below ‘Before sheet:’, select the sheet before which you want the duplicate sheet to go.
- At the end of the workbook’s sheet tabs – For this, from the list below ‘Before sheet:’ select the ‘move to end’ option.
- Click OK to close the dialog box.
Note: In the Move or Copy dialog box, the drop-down list below ‘To book’ displays only those workbooks that are currently open.
Using this Method to Duplicate Multiple Sheets
If you want to duplicate multiple sheets, press down the CTRL key and select the sheets you want to copy.
If the sheet tabs are next to each other, you can click on the tab of the first sheet, press down the SHIFT key, and select the last sheet that you want to duplicate.
After that, follow steps 1 to 7 shown above.
Using the Worksheet tab Context Menu to Duplicate a Sheet in Excel
You can also use Excel’s context menu to duplicate one or more sheets. To use this method, follow the steps below:
- Right-click on the tab of the worksheet that you want to duplicate.
- Select ‘Move or Copy’ from the context menu that appears.
- This will open the Move or Copy dialog box.
- Make sure the checkbox next to ‘Create a Copy’ is checked.
- Select where you want the duplicate sheet to go.
- Click OK to close the dialog box.
- You should now see a duplicate of your selected worksheet created in your selected location.
Using this Method to Duplicate Multiple Sheets
If you want to duplicate multiple sheets, press down the CTRL key and select the sheets you want to copy.
After that, follow steps 1 to 7 shown above.
Dragging to Duplicate a Sheet in Excel
This method is by far the quickest. It lets you duplicate one or more worksheets without having to involve any menus. Here are the steps:
- Select the tab of the worksheet you want to duplicate.
- Hold down the CTRL of your keyboard and use the left mouse button to drag the tab to the right or left, depending on where you want the new duplicate sheet to go.
- You should see a small arrow at the top of the tabs indicating the position where the newly duplicated sheet will be placed.
- Release the mouse button once you find the spot where you want the new sheet to go.
You should now see a duplicate of your selected sheet at the point where you released your mouse button.
Using this Method to Duplicate Multiple Sheets
If you want to duplicate multiple sheets, you can select the sheets you want to duplicate, and then follow steps 2 to 4.
Make sure you release the CTRL or Shift key before pressing down the CTRL key again for step 2.
Making Multiple Duplicates of a Sheet (Using VBA)
There might be some special situations where you would want to make multiple duplicates of a sheet.
For example, you might need to make 20 copies of a worksheet to say, track transactions in different locations.
In such cases, you can use macros coded in VB Script to quickly make as many duplicates as you need to.
If you are apprehensive at the thought of coding, you really don’t need to be. Here’s a step-by-step on how to create a macro that can make multiple duplicates of a sheet.
The code that we will be using is given below:
Sub DuplicateSheet() Dim x As Integer x = InputBox("Enter number of times to copy the Active Sheet") For numtimes = 1 To x ActiveSheet.Copy After:=Worksheets(Worksheets.Count) Next End Sub
This code lets the user enter how many copies of the active sheet they want to make. It then creates that many copies and places the new worksheets at the end of the worksheet tabs list.
To create a macro using the above code to make multiple duplicates of a sheet, follow the steps below:
- Make sure the sheet you want to duplicate is the active sheet.
- From the Developer menu, select Visual Basic.
- Once your VBA window opens, Click Insert->Module. Now you can start coding.
- Type or copy-paste the code is shown above into the module window.
- Run the code by clicking on the Run button from the toolbar on top.
- You should see a message box asking you to enter how many copies you need to make.
- Enter the number of duplicates you need and press the return key.
- You should now see your required number of duplicates created towards the end of the workbook’s sheet tabs.
Note: If you can’t see the Developer menu, from the File menu, go to Options. Select Customize Ribbon and check the Developer option from the Main Tabs. Finally, Click OK.
Once your code is ready and working, you can use it as many times as you need to. All you need to do is select ‘Macros’ from the Developer tab.
Select the name of the macro (‘DuplicateSheet’).
Finally, click the ‘Run’ button to run the macro.
In this tutorial, we showed you three ways in which you can create duplicates of one or more worksheets in Excel.
We also showed you how you can use VB Script to make multiple copies of a worksheet.
We hope our instructions were clear and that you found the tutorial helpful.
Other Excel tutorials you may like:
- How to Group and Ungroup Worksheets in Excel
- How to Copy Multiple Sheets to a New Workbook in Excel
- How to Print Multiple Tabs/Sheets in Excel
- How to Remove Panes in Excel Worksheet (Shortcut)
- Get Unique Values from a Column in Excel
- Add New Sheet in Excel (Shortcut)
- How to Get Sheet Names in Excel?