Excel delete all but one duplicate

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.

  1. Select the cells you want to check for duplicates.

    Note: Excel can’t highlight duplicates in the Values area of a PivotTable report.

  2. Click Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values.

    Remove Duplicates 1

  3. In the box next to values with, pick the formatting you want to apply to the duplicate values, and then click OK.

    Remove Duplicates 2​​​​​​​

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.

  1. Select the range of cells that has duplicate values you want to remove.

  2. Click Data > Remove Duplicates, and then Under Columns, check or uncheck the columns where you want to remove the duplicates.

    Remove Duplicates 3

    For example, in this worksheet, the January column has price information I want to keep.

    Duplicate values highlighted

    So, I unchecked January in the Remove Duplicates box.

    Remove Duplicates 5

  3. Click OK.

Note: The counts of duplicate and unique values given after removal may include empty cells, spaces, etc. 

Need more help?

Connect with an expert. Learn from live instructors.​​​​​​​

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Excel spreadsheets continue to represent a key tool for data storage and visualization. Functionalities such as Find & Replace or Sort help users speed up repetitive tasks that would otherwise be time-consuming and inefficient. Just like working on a spreadsheet with blank rows or cells that interfere with the correct application of rules and formulae, duplicate data can cause similar issues.

In this post, you will learn different ways to find duplicate values to either highlight this information or delete as many duplicates as needed. From more basic highlighting features to more advanced filtering options, you’ll learn how to work with the full potential of the desktop version of Excel.

If you want to avoid duplicate data entry in Google Sheets, you can do that easily using Layer. Layer is a free add-on that allows you to share sheets or ranges of your main spreadsheet with different people. On top of that, you get to monitor and approve edits and changes made to the shared files before they’re merged back into your master file, giving you more control over your data.

Install the Layer Google Sheets Add-On today and Get Free Access to all the paid features, so you can start managing, automating, and scaling your processes on top of Google Sheets!

How to find and remove duplicate rows in Excel?

The various methods shown in this article will first find the duplicate values to be removed and then show how to delete them. This two-step process is crucial, especially considering that you may not want to delete the duplicates automatically and keep only the unique value. Let’s look at the first method to remove all duplicates.

How to Check for Duplicates in Excel?

How to remove duplicates using the Remove Duplicates feature?

What is the shortcut to removing duplicates in Excel? The shortcut is actually a built-in command available in the ribbon, which you can use in the following way.

  1. 1. Open your Excel spreadsheet and select any range in your spreadsheet which you want to delete duplicate rows from.

How to Find and Remove Duplicates in Excel find duplicate rows

How to Find and Remove Duplicates in Excel — Find duplicate rows

  1. 2. Go to Data > Remove duplicates.

How to Find and Remove Duplicates in Excel remove duplicates

How to Find and Remove Duplicates in Excel — Remove duplicates

If you haven’t selected all data in your spreadsheet, Excel will give you the option of expanding the search to the entire document, which is recommended. Click “OK”.

  1. 3. In case your data selection has headers, tick the column boxes that contain them so as not to be counted in the duplicate search. All columns in my example contain headers, so I’ll leave all boxes ticked. Click “OK”.

How to Find and Remove Duplicates in Excel remove headers from duplicate search

How to Find and Remove Duplicates in Excel — Remove headers from duplicate search

  1. 4. Excel prompts you with a dialog box informing you about the exact number of duplicate values it found and removed, as well as the number of unique values remaining in your spreadsheet.

How to Find and Remove Duplicates in Excel duplicate values found

How to Find and Remove Duplicates in Excel — Duplicate values found

How to Combine Multiple Excel Columns Into One?

There are many ways to combine multiple columns into a single column in Excel. Here’s how to do it without losing any data

READ MORE

How to Combine Multiple Excel Columns Into One

How to delete duplicates in Excel but keep one?

Although the previous method is helpful at targeting all duplicates, this means that the unique data will also be permanently deleted. To avoid this, you may want to explore the following methods.

Here’s how to delete duplicates in Excel but keep one; we strongly recommend that you always keep a copy spreadsheet in case you want to go back to the original dataset.

How to remove duplicates using the Advanced Filter option?

This is a straightforward way to get rid of any duplicate content without deleting them entirely; instead, the Advanced filter option hides your duplicates from your dataset.

  1. 1. Select a cell in your dataset and go to Data > Advanced filter to the far right.

How to Find and Remove Duplicates in Excel Advanced filter

How to Find and Remove Duplicates in Excel — Advanced filter

  1. 2. Choose to “Filter the list, in-place” or “Copy to another location”. The first option will hide any row containing duplicates, while the second will make a copy of the data.

How to Find and Remove Duplicates in Excel Filter list

How to Find and Remove Duplicates in Excel — Filter list

Leave the “List range” field empty, if you want Excel to list it automatically. You can also leave the “Criteria range” empty. The only mandatory field to fill out is the “Copy to” if you selected the “Copy to another location” option.

  1. 3. Tick the “Unique records only” box to keep the unique values, and then “OK” to remove all duplicates.

How to Find and Remove Duplicates in Excel how to keep unique values

How to Find and Remove Duplicates in Excel — How to keep unique values

Advanced filters are an excellent way to remove duplicate values while keeping a copy of the original data. Don’t forget that the Advanced filter option only applies to the entire table.

How to remove duplicates using Excel formulae?

Although you can combine various formulae to remove duplicates in Excel, in 2018, Microsoft integrated the UNIQUE formula to make this process much easier. First, let’s explore the syntax of the UNIQUE formula:

=UNIQUE (array, [by_col], [exactly_once])
  • array refers to the range of cells we will extract unique values from and represents the only required argument.
  • [by_col] is an optional parameter determining the search for unique values by rows or columns.
  • [exactly_once] is the other optional parameter and sets the behavior for values that appear more than once. If you want the formula to return items that appear exactly once, then write “TRUE”; however, if you want it to return every distinct item, then write “FALSE”.

Let’s now apply the =UNIQUE formula to our dataset.

  1. 1. Enter the formula next to the set of data. You can either leave one column in between or place it directly next to the last data column. Like in most Excel formulae, as soon as you type at the beginning of the formula, the rest will prompt automatically. Select the range you want to apply the formula to.

How to Find and Remove Duplicates in Excel UNIQUE formula

How to Find and Remove Duplicates in Excel — UNIQUE formula

  1. 2. You can leave the second parameter [by_col] by simply including the comma before and after its place. Let’s first see what happens when we include “TRUE” for the [exactly_once] parameter.

How to Find and Remove Duplicates in Excel UNIQUE function

How to Find and Remove Duplicates in Excel — UNIQUE function

  1. 3. As soon as you press the Return key, Excel removes all duplicates. In this example, it has removed rows 5 and 6.

How to Find and Remove Duplicates in Excel TRUE UNIQUE formula

How to Find and Remove Duplicates in Excel — TRUE UNIQUE formula

Let’s see how by including “FALSE” as the last parameter, Excel will keep the unique value.

  1. 1. Follow the previous steps, and now wrote “FALSE”, to return every distinct value.

How to Find and Remove Duplicates in Excel FALSE UNIQUE formula

How to Find and Remove Duplicates in Excel — FALSE UNIQUE formula

  1. 2. Now, the UNIQUE formula has returned row 5 and only deleted the duplicate value in row 6.

How to Find and Remove Duplicates in Excel FALSE UNIQUE formula return

How to Find and Remove Duplicates in Excel — FALSE UNIQUE formula return

How to remove duplicates using conditional formatting?

Conditional formatting is an Excel feature that helps users filter, sort, and organize data according to built-in rules or custom ones created by the user. The most common feature is the “Highlight Cell Rules”, which allows you to format cell values according to color, font, and various other format styles. Although this method won’t directly remove duplicates, it will make them extremely clear to identify.

  1. 1. Select the range of cells you want to apply the conditional formatting rule to. Then go to Home > Conditional Formatting > Highlight Cell Rules > Duplicate Values.

How to Find and Remove Duplicates in Excel Conditional formatting

How to Find and Remove Duplicates in Excel — Conditional formatting

  1. 2. Set the “Style” to “Classic” and then “Format only unique or duplicate values”. Don’t forget to leave the drop-down menu to “duplicate”. Finally, choose the formatting style using the “Format with” drop-down menu. Click “OK”.

How to Find and Remove Duplicates in Excel Conditional formatting remove duplicates

How to Find and Remove Duplicates in Excel — Conditional formatting remove duplicates

  1. 3. You can see how Excel highlights all duplicate values, including the cells. This means that you will need to make sure to only remove rows unless you are actually interested in removing all duplicates.

How to Find and Remove Duplicates in Excel highlight duplicates conditional formatting

How to Find and Remove Duplicates in Excel — Highlight duplicates conditional formatting]

In case you want to highlight rows, you can combine all row values in one cell using the =CONCAT formula; if you would like to learn more about this function, read this article on the Microsoft support page.

How to remove duplicates based on one or more columns in Excel?

As a more advanced use of Excel, you can remove duplicates based on one or more columns using Power Query. This feature allows you to select the columns you would like to remove the duplicates from. Let’s explore how to use Power Query to remove duplicates based on one or more columns.

  1. 1. Go to Data > Get Data (Power Query).

How to Find and Remove Duplicates in Excel Power Query

How to Find and Remove Duplicates in Excel — Power Query

  1. 2. Choose “Excel workbook” as your data source.

How to Find and Remove Duplicates in Excel Power Query data source

How to Find and Remove Duplicates in Excel — Power Query data source

  1. 3. Browse through your files and select the spreadsheet you want to apply the Power Query function to. Click “Next”.

How to Find and Remove Duplicates in Excel Power Query load data

How to Find and Remove Duplicates in Excel — Power Query load data

  1. 4. Tick the checkbox next to the worksheet containing your data (located in the left-side menu). Then, click “Load” in the bottom right-hand corner.

How to Find and Remove Duplicates in Excel Power Query load data 2

How to Find and Remove Duplicates in Excel — Power Query load data

  1. 5. As you can see, the dataset has been transformed into a table.

How to Find and Remove Duplicates in Excel Power Query table

How to Find and Remove Duplicates in Excel — Power Query table

  1. 6. Select the columns to apply the Power Query to by pressing Ctrl/Cmd + click on the columns.

How to Find and Remove Duplicates in Excel Power Query table 2

How to Find and Remove Duplicates in Excel — Power Query table

  1. 7. To delete duplicates, simply click on “Remove Duplicates” in the “Data” tab. Then click “OK” in the pop-up dialog box.

How to Find and Remove Duplicates in Excel Remove Duplicates 2

How to Find and Remove Duplicates in Excel — Remove Duplicates

  1. 8. Excel will inform you about the number of duplicates removed and how many unique values remain.

How to Find and Remove Duplicates in Excel Final Alert message

How to Find and Remove Duplicates in Excel — Final Alert message

Don’t worry about removing all duplicates, since the dataset you worked on is a copy created by the Power Query function. However, if you want to keep unique values, follow the steps outlined in the sections on the Advanced Filter option or =UNIQUE formula in Excel.

Want to Boost Your Team’s Productivity and Efficiency?

Transform the way your team collaborates with Confluence, a remote-friendly workspace designed to bring knowledge and collaboration together. Say goodbye to scattered information and disjointed communication, and embrace a platform that empowers your team to accomplish more, together.

Key Features and Benefits:

  • Centralized Knowledge: Access your team’s collective wisdom with ease.
  • Collaborative Workspace: Foster engagement with flexible project tools.
  • Seamless Communication: Connect your entire organization effortlessly.
  • Preserve Ideas: Capture insights without losing them in chats or notifications.
  • Comprehensive Platform: Manage all content in one organized location.
  • Open Teamwork: Empower employees to contribute, share, and grow.
  • Superior Integrations: Sync with tools like Slack, Jira, Trello, and more.

Limited-Time Offer: Sign up for Confluence today and claim your forever-free plan, revolutionizing your team’s collaboration experience.

Conclusion

As we have seen, there are many ways to identify and eliminate duplicates in your data, depending on your needs. Not only can you now successfully organize your data correctly, but removing duplicates makes it easier to identify key patterns and create accurate reports, particularly when working with larger datasets.

Duplicate values in your data can be a big problem! It can lead to substantial errors and over estimate your results.

But finding and removing them from your data is actually quite easy in Excel.

In this tutorial, we are going to look at 7 different methods to locate and remove duplicate values from your data.

Video Tutorial

What Is A Duplicate Value?

Duplicate values happen when the same value or set of values appear in your data.

For a given set of data you can define duplicates in many different ways.

In the above example, there is a simple set of data with 3 columns for the Make, Model and Year for a list of cars.

  1. The first image highlights all the duplicates based only on the Make of the car.
  2. The second image highlights all the duplicates based on the Make and Model of the car. This results in one less duplicate.
  3. The second image highlights all the duplicates based on all columns in the table. This results in even less values being considered duplicates.

The results from duplicates based on a single column vs the entire table can be very different. You should always be aware which version you want and what Excel is doing.

Find And Remove Duplicate Values With The Remove Duplicates Command

Removing duplicate values in data is a very common task. It’s so common, there’s a dedicated command to do it in the ribbon.

Select a cell inside the data which you want to remove duplicates from and go to the Data tab and click on the Remove Duplicates command.

Excel will then select the entire set of data and open up the Remove Duplicates window.

  1. You then need to tell Excel if the data contains column headers in the first row. If this is checked, then the first row of data will be excluded when finding and removing duplicate values.
  2. You can then select which columns to use to determine duplicates. There are also handy Select All and Unselect All buttons above you can use if you’ve got a long list of columns in your data.

When you press OK, Excel will then remove all the duplicate values it finds and give you a summary count of how many values were removed and how many values remain.

This command will alter your data so it’s best to perform the command on a copy of your data to retain the original data intact.

Find And Remove Duplicate Values With Advanced Filters

There is also another way to get rid of any duplicate values in your data from the ribbon. This is possible from the advanced filters.

Select a cell inside the data and go to the Data tab and click on the Advanced filter command.

This will open up the Advanced Filter window.

  1. You can choose to either to Filter the list in place or Copy to another location. Filtering the list in place will hide rows containing any duplicates while copying to another location will create a copy of the data.
  2. Excel will guess the range of data, but you can adjust it in the List range. The Criteria range can be left blank and the Copy to field will need to be filled if the Copy to another location option was chosen.
  3. Check the box for Unique records only.

Press OK and you will eliminate the duplicate values.

Advanced filters can be a handy option for getting rid of your duplicate values and creating a copy of your data at the same time. But advanced filters will only be able to perform this on the entire table.

Find And Remove Duplicate Values With A Pivot Table

Pivot tables are just for analyzing your data, right?

You can actually use them to remove duplicate data as well!

You won’t actually be removing duplicate values from your data with this method, you will be using a pivot table to display only the unique values from the data set.

First, create a pivot table based on your data. Select a cell inside your data or the entire range of data ➜ go to the Insert tab ➜ select PivotTable ➜ press OK in the Create PivotTable dialog box.

With the new blank pivot table add all fields into the Rows area of the pivot table.

You will then need to change the layout of the resulting pivot table so it’s in a tabular format. With the pivot table selected, go to the Design tab and select Report Layout. There are two options you will need to change here.

  1. Select the Show in Tabular Form option.
  2. Select the Repeat All Item Labels option.

You will also need to remove any subtotals from the pivot table. Go to the Design tab ➜ select Subtotals ➜ select Do Not Show Subtotals.

You now have a pivot table that mimics a tabular set of data!

Pivot tables only list unique values for items in the Rows area, so this pivot table will automatically remove any duplicates in your data.

Find And Remove Duplicate Values With Power Query

Power Query is all about data transformation, so you can be sure it has the ability to find and remove duplicate values.

Select the table of values which you want to remove duplicates from ➜ go to the Data tab ➜ choose a From Table/Range query.

Remove Duplicates Based On One Or More Columns

With Power Query, you can remove duplicates based on one or more columns in the table.

You need to select which columns to remove duplicates based on. You can hold Ctrl to select multiple columns.

Right click on the selected column heading and choose Remove Duplicates from the menu.

You can also access this command from the Home tab ➜ Remove RowsRemove Duplicates.

= Table.Distinct(#"Previous Step", {"Make", "Model"})

If you look at the formula that’s created, it is using the Table.Distinct function with the second parameter referencing which columns to use.

Remove Duplicates Based On The Entire Table

To remove duplicates based on the entire table, you could select all the columns in the table then remove duplicates. But there is a faster method that doesn’t require selecting all the columns.

There is a button in the top left corner of the data preview with a selection of commands that can be applied to the entire table.

Click on the table button in the top left corner ➜ then choose Remove Duplicates.

= Table.Distinct(#"Previous Step")

If you look at the formula that’s created, it uses the same Table.Distinct function with no second parameter. Without the second parameter, the function will act on the whole table.

Keep Duplicates Based On A Single Column Or On The Entire Table

In Power Query, there are also commands for keeping duplicates for selected columns or for the entire table.

Follow the same steps as removing duplicates, but use the Keep RowsKeep Duplicates command instead. This will show you all the data that has a duplicate value.

Find And Remove Duplicate Values Using A Formula

You can use a formula to help you find duplicate values in your data.

First you will need to add a helper column that combines the data from any columns which you want to base your duplicate definition on.

= [@Make] & [@Model] & [@Year]

The above formula will concatenate all three columns into a single column. It uses the ampersand operator to join each column.

= TEXTJOIN("", FALSE , CarList[@[Make]:[Year]])

If you have a long list of columns to combine, you can use the above formula instead. This way you can simply reference all the columns as a single range.

You will then need to add another column to count the duplicate values. This will be used later to filter out rows of data that appear more than once.

= COUNTIFS($E$3:E3, E3)

Copy the above formula down the column and it will count the number of times the current value appears in the list of values above.

If the count is 1 then it’s the first time the value is appearing in the data and you will keep this in your set of unique values. If the count is 2 or more then the value has already appeared in the data and it is a duplicate value which can be removed.

Add filters to your data list.

  • Go to the Data tab and select the Filter command.
  • Use the keyboard shortcut Ctrl + Shift + L.

Now you can filter on the Count column. Filtering on 1 will produce all the unique values and remove any duplicates.

You can then select the visible cells from the resulting filter to copy and paste elsewhere. Use the keyboard shortcut Alt + ; to select only the visible cells.

Find And Remove Duplicate Values With Conditional Formatting

With conditional formatting, there’s a way to highlight duplicate values in your data.

Just like the formula method, you need to add a helper column that combines the data from columns. The conditional formatting doesn’t work with data across rows, so you’ll need this combined column if you want to detect duplicates based on more than one column.

Then you need to select the column of combined data.

To create the conditional formatting, go to the Home tab ➜ select Conditional FormattingHighlight Cells RulesDuplicate Values.

This will open up the conditional formatting Duplicate Values window.

  1. You can select to either highlight Duplicate or Unique values.
  2. You can also choose from a selection of predefined cell formats to highlight the values or create your own custom format.

Warning: The previous methods to find and remove duplicates considers the first occurrence of a value as a duplicate and will leave it intact. However, this method will highlight the first occurrence and will not make any distinction.

With the values highlighted, you can now filter on either the duplicate or unique values with the filter by color option. Make sure to add filters to your data. Go to the Data tab and select the Filter command or use the keyboard shortcut Ctrl + Shift + L.

  1. Click on the filter toggle.
  2. Select Filter by Color in the menu.
  3. Filter on the color used in the conditional formatting to select duplicate values or filter on No Fill to select unique values.

You can then select just the visible cells with the keyboard shortcut Alt + ;.

Find And Remove Duplicate Values Using VBA

There is a built in command in VBA for removing duplicates within list objects.

Sub RemoveDuplicates() Dim DuplicateValues As Range Set DuplicateValues = ActiveSheet.ListObjects("CarList").Range DuplicateValues.RemoveDuplicates Columns:=Array(1, 2, 3), Header:=xlYes End Sub

The above procedure will remove duplicates from an Excel table named CarList.

Columns:=Array(1, 2, 3)

The above part of the procedure will set which columns to base duplicate detection on. In this case it will be on the entire table since all three columns are listed.

Header:=xlYes

The above part of the procedure tells Excel the first row in our list contains column headings.

You will want to create a copy of your data before running this VBA code, as it can’t be undone after the code runs.

Conclusions

Duplicate values in your data can be a big obstacle to a clean data set.

Thankfully, there are many options in Excel to easily remove those pesky duplicate values.

So, what’s your go to method to remove duplicates?

About the Author

John MacDougall

John is a Microsoft MVP and qualified actuary with over 15 years of experience. He has worked in a variety of industries, including insurance, ad tech, and most recently Power Platform consulting. He is a keen problem solver and has a passion for using technology to make businesses more efficient.

After searching through the forums, I am unable to find out how to accomplish this.

Columns:

Supervisor — Date — Employee — QA Specialist Name

Data:

Dave — 10/10/2010 18:29:34 — Tommy — Jen

Dave — 10/10/2010 18:29:34 — Tommy — Jen

Sara — 10/10/2010 18:30:15 — Jonny — Bob

‘Remove Duplicates’ leaves me with:

Sara — 10/10/2010 18:30:15 — Jonny — Bob

I want:

Dave — 10/10/2010 18:29:34 — Tommy — Jen

Sara — 10/10/2010 18:30:15 — Jonny — Bob

Since Microsoft decided to misname this function, how would I actually go about deleting only the duplicated rows? I have thousands of rows of data, so doing this manually is not feasable. Also, I only have Excel to work with using this.

*Note: This was after doing my best to get the answer from the forums. This was also after several hours of fighting Excel. I’m pretty much all out of luck at this point.

Skip to content

Как убрать повторяющиеся значения в Excel?

В этом руководстве объясняется, как удалять повторяющиеся значения в Excel. Вы изучите несколько различных методов поиска и удаления дубликатов, избавитесь от дублирующих строк, обнаружите точные повторы и частичные совпадения.

Хотя Microsoft Excel является в первую очередь инструментом для расчетов, его таблицы часто используются в качестве баз данных для отслеживания запасов, составления отчетов о продажах или ведения списков рассылки.

Распространенная проблема, возникающая при увеличении размера базы данных, заключается в том, что в ней появляется много повторов. И даже если ваш огромный файл содержит всего несколько идентичных записей, эти несколько повторов могут вызвать массу проблем. Например, вряд ли порадует отправка нескольких копий одного и того же документа одному человеку или появление одних и тех же данных в отчете несколько раз.

Поэтому, прежде чем использовать базу данных, имеет смысл проверить ее на наличие дублирующих записей, чтобы убедиться, что вы не будете потом тратить время на исправление ошибок.

  • Как вручную удалить повторяющиеся строки
  • Удаление дубликатов в «умной» таблице
  • Убираем повторы, копируя уникальные записи в другое место
  • Формулы для удаления дубликатов
  • Формулы для поиска дубликатов в столбце
  • Удаление дублирующихся строк при помощи формул
  • Универсальный инструмент для поиска и удаления дубликатов в Excel

В нескольких наших недавних статьях мы обсуждали различные способы выявления дубликатов в Excel и выделения неуникальных ячеек или строк (см.ссылки в конце статьи). Однако могут возникнуть ситуации, когда вы захотите в конечном счете устранить дубли в ваших таблицах. И это как раз тема этого руководства.

Удаление повторяющихся строк вручную

Если вы используете последнюю версию Microsoft Excel с 2007 по 2019, у вас есть небольшое преимущество. Эти версии содержат встроенную функцию для поиска и удаления повторяющихся значений.

Этот инструмент позволяет находить и удалять абсолютные совпадения (ячейки или целые строки), а также частично совпадающие записи (имеющие одинаковые значения в столбце или диапазоне). 

Важно! Поскольку инструмент «Удалить дубликаты» навсегда удаляет идентичные записи, рекомендуется создать копию исходных данных, прежде чем удалять что-либо.

Для этого выполните следующие действия.

  1. Для начала выберите диапазон, в котором вы хотите работать. Чтобы выделить всю таблицу, нажмите Ctrl + A,
  2. Указав диапазон, перейдите на вкладку «Данные» >  и нажмите кнопку «Удалить дубликаты» .

  1. Откроется диалоговое окно. Выберите столбцы для проверки на наличие дублей и нажмите кнопку «ОК».
    • Чтобы удалить повторяющиеся строки, которые имеют абсолютно одинаковые данные во всех колонках, оставьте флажки рядом со всеми столбцами, как на скриншоте ниже.
    • Чтобы удалить частичные совпадения на основе одного или нескольких ключевых столбцов, выберите только их. Если в вашей таблице много колонок, самый быстрый способ — нажать кнопку «Снять выделение». А затем отметить те, которые вы хотите проверить.
    • Ежели в вашей таблице нет заголовков, снимите флажок Мои данные в верхнем правом углу диалогового окна, который обычно включается по умолчанию.
  2. Если указать в диалоговом окне все столбцы, строка будет удалена только в том случае, если повторяются значения есть во всех них. Но в некоторых ситуациях не нужно учитывать данные, находящиеся в определенных колонках. Поэтому для них снимите флажки. К примеру, если каждая строчка содержит уникальный идентификационный код, программа никогда не найдет ни одной повторяющейся. Поэтому флажок рядом с колонкой с такими кодами следует снять.

Выполнено! Все повторяющиеся строки в нашем диапазоне удаляются, и отображается сообщение, указывающее, сколько повторяющихся записей было удалено и сколько осталось уникальных.

Важное замечание. Повторяющиеся значения определяются по тому, что отображается в ячейке, а не по тому, что в ней записано на самом деле. Представим, что в A1  и A2 содержится одна и та же дата. Одна из них представлена в формате 15.05.2020, а другая отформатирована в формате 15 май 2020. При поиске повторяющихся значений Excel считает, что это не одно и то же. Аналогично значения, которые отформатированы по-разному, считаются разными, поэтому $1 209,32 — это совсем не одно и то же, что 1209,32.

Поэтому, для того чтобы обеспечить успешный поиск и удаление повторов в таблице или диапазоне данных, рекомендуется применить один формат ко всему столбцу.
Примечание. Функция удаления дублей убирает 2-е и все последующие совпадения, оставляя все уникальные и первые экземпляры идентичных записей. 

Удаление дубликатов в «умной таблице».

Думаю, вы знаете, что, если преобразовать диапазон ячеек в таблицу, в нашем распоряжении появляется множество интересных дополнительных возможностей по работе с этими данными. Именно по этой причине такую таблицу Excel называют «умной».

Выделите нужную нам область, затем на вкладке «Главная» выберите «Форматировать как таблицу». Далее вам будет предложено указать желаемый вариант оформления. Когда закончите, автоматически откроется вкладка «Конструктор».

Выбираем на ленте нужную кнопку, как показано на скриншоте. Затем отмечаем те столбцы, в которых будем искать повторы. Ну а далее произойдет то же самое, что было описано в предыдущем разделе.

Но, в отличие от ранее рассмотренного инструмента удаления, операцию можно отменить, если что-то пошло не так.

Избавьтесь от повторов, скопировав уникальные записи в другое место.

Еще один способ удалить повторы — это выбрать все уникальные записи и скопировать их на другой лист или в другую книгу. Подробные шаги следуют ниже.

  1. Выберите диапазон или всю таблицу, которую вы хотите обработать (1).
  2. Перейдите на вкладку «Данные» (2) и нажмите кнопку «Фильтр — Дополнительно» (3-4).
  3. В диалоговом окне «Расширенный фильтр» (5) выполните следующие действия:
    • Выберите переключатель скопировать в другое место (6).
    • Убедитесь, что в списке диапазонов указан правильный диапазон. Это должен быть диапазон из шага 1.
    • В поле «Поместить результат в…» (7) введите диапазон, в который вы хотите скопировать уникальные записи  (на самом деле достаточно указать его верхнюю левую ячейку).
    • Выберите только уникальные записи (8).
  4. Наконец, нажмите кнопку ОК, и уникальные значения будут скопированы в новое место:

Замечание. Расширенный фильтр позволяет копировать отфильтрованные данные в другое место только на активном листе. Например, выберите место внизу под вашими исходными данными.

Я думаю, вы понимаете, что можно обойтись и без копирования. Просто выберите опцию «Фильтровать список на месте», и дублирующиеся записи будут на время скрыты при помощи фильтра. Они не удаляются, но и мешать вам при этом не будут.

Как убрать дубликаты строк с помощью формул.

Еще один способ удалить неуникальные данные — идентифицировать их с помощью формулы, затем отфильтровать, а затем после этого удалить лишнее.

Преимущество этого подхода заключается в универсальности: он позволяет вам:

  • находить и удалять повторы в одном столбце,
  • находить дубликаты строк на основе значений в нескольких столбиках данных,
  • оставлять первые вхождения повторяющихся записей.

Недостатком является то, что вам нужно будет запомнить несколько формул.

В зависимости от вашей задачи используйте одну из следующих формул для обнаружения повторов. 

Формулы для поиска повторяющихся значений в одном столбце

Добавляем еще одну колонку, в которой запишем формулу.

Повторы наименований товаров, без учета первого вхождения:

=ЕСЛИ(СЧЁТЕСЛИ($B$2:$B2; $B2)>1; «Дубликат»; «»)

Как видите, когда значение встречается впервые (к примеру, в B4), оно рассматривается как вполне обычное. А вот второе его появление (в B7) уже считается повтором.

Отмечаем все повторы вместе с первым появлением:

=ЕСЛИ(СЧЁТЕСЛИ($B$2:$B$17; $B2)>1; «Дубликат»; «Уникальный»)

Где A2 — первая, а A10 — последняя ячейка диапазона, в котором нужно найти совпадения.

Ну а теперь, чтобы убрать ненужное, устанавливаем фильтр и в столбце H и оставляем только «Дубликат». После чего строки, оставшиеся на экране, просто удаляем.

Вот небольшая пошаговая инструкция.

  1. Выберите любую ячейку и примените автоматический фильтр, нажав кнопку «Фильтр» на вкладке «Данные».
  2. Отфильтруйте повторяющиеся строки, щелкнув стрелку в заголовке нужного столбца.
  3. И, наконец, удалите повторы. Для этого выберите отфильтрованные строки, перетаскивая указатель мыши по их номерам, щелкните правой кнопкой мыши и выберите «Удалить строку» в контекстном меню. Причина, по которой вам нужно сделать это вместо простого нажатия кнопки «Удалить» на клавиатуре, заключается в том, что это действие будет удалять целые строки, а не только содержимое ячейки.

Формулы для поиска повторяющихся строк.

В случае, если нам нужно найти и удалить повторяющиеся строки (либо часть их), действуем таким же образом, как для отдельных ячеек. Только формулу немного меняем.

Отмечаем при помощи формулы неуникальные строчки, кроме 1- го вхождения:

=ЕСЛИ(СЧЁТЕСЛИМН($B$2:$B2; $B2;$A$2:A2;$A2;$C$2:C2;$C2)>1; «Дубликат»; «»)

В результате видим 2 повтора.

Теперь самый простой вариант действий – устанавливаем фильтр по столбцу H и слову «Дубликат». После этого просто удаляем сразу все отфильтрованные строки.

Если нам нужно исключить все повторяющиеся строки вместе с их первым появлением:

=ЕСЛИ(СЧЁТЕСЛИМН($B$2:$B$17; $B2;$A$2:$A$17;$A2;$C$2:$C$17;$C2)>1; «Дубликат»; «»)

Далее вновь устанавливаем фильтр и действуем аналогично описанному выше.

Насколько удобен этот  метод – судить вам.

Duplicate Remover — универсальный инструмент для поиска и удаления дубликатов в Excel.

В отличие от встроенной функции Excel для удаления дубликатов, о которой мы рассказывали выше, надстройка Ablebits Duplicate Remover не ограничивается только удалением повторяющихся записей. Подобно швейцарскому ножу, этот многофункциональный инструмент сочетает в себе все основные варианты использования и позволяет определять, выбирать, выделять, удалять, копировать и перемещать уникальные или повторяющиеся значения, с первыми вхождениями или без них, целиком повторяющиеся или частично совпадающие строки в одной таблице или путем сравнения двух таблиц.

Он безупречно работает во всех операционных системах и во всех версиях Microsoft Excel 2019 — 2003.

Как избавиться от дубликатов в Excel в 2 клика мышки.

Предполагая, что в вашем Excel установлен Ultimate Suite, выполните следующие простые шаги, чтобы удалить повторяющиеся строки или ячейки:

  1. Выберите любую ячейку в таблице, c которой вы хотите работать, и нажмите Quick Dedupe на вкладке Ablebits Data.

  1. Откроется диалоговое окно, и все столбцы будут выбраны по умолчанию. Выберите те, которые вам нужны, а также в выпадающем списке в правом нижнем углу укажите желаемое действие.

Поскольку моя цель – просто выделить повторяющиеся данные, я выбрал «Закрасить цветом».

Помимо выделения цветом, вам доступны и другие операции:

  1. Удалить дубликаты
  2. Выбрать дубликаты
  3. Указать их в столбце статуса
  4. Копировать дубликаты на новый лист
  5. Переместить на новый лист
  • Нажимаем кнопку OK и оцениваем получившийся результат:

Как вы можете видеть на скриншоте выше, строки с повторяющимися значениями в первых 3 столбцах были обнаружены (первые вхождения здесь по умолчанию не считаются как дубликаты).

Совет. Если вы хотите определить повторяющиеся строки на основе значений в ключевом столбце, оставьте выбранным только этот столбец (столбцы) и снимите флажки со всех остальных неактуальных столбцов.

И если вы хотите выполнить какое-то другое действие, например, удалить повторяющиеся строки, или скопировать повторяющиеся значения в другое место, выберите соответствующий вариант из раскрывающегося списка.

Больше возможностей для поиска дубликатов при помощи Duplicate Remover.

Если вам нужны дополнительные параметры, такие как удаление повторяющихся строк, включая первые вхождения, или поиск уникальных значений, используйте мастер Duplicate Remover, который предоставляет эти и некоторые другие возможности. Рассмотрим на примере, как найти повторяющиеся значения с первым вхождением или без него.

Удаление дубликатов в Excel — обычная операция. Однако в каждом конкретном случае может быть ряд особенностей. В то время как инструмент Quick Dedupe фокусируется на скорости, Duplicate Remover предлагает ряд дополнительных опций для работы с дубликатами и уникальными значениями.

  1. Выберите любую ячейку в таблице, где вы хотите удалить дубликаты, переключитесь на вкладку Ablebits Data и нажмите кнопку Duplicate Remover.

  1. Вам предложены 4 варианта проверки дубликатов в вашем листе Excel:
    • Дубликаты без первых вхождений повторяющихся записей.
    • Дубликаты с 1-м вхождением.
    • Уникальные записи.
    • Уникальные значения и 1-е повторяющиеся вхождения.
  2. В этом примере выберем второй вариант, т.е. Дубликаты + 1-е вхождения:

  1. Все ваши данные будут автоматически выделены.
  2. Теперь выберите столбцы, в которых вы хотите проверить дубликаты. Как и в предыдущем примере, мы выбираем первые 3 столбца:

  1. Наконец, выберите действие, которое вы хотите выполнить с дубликатами. Как и в случае с инструментом быстрого поиска дубликатов, мастер Duplicate Remover может идентифицировать, выбирать, выделять, удалять, копировать или перемещать повторяющиеся данные.

Чтобы более наглядно увидеть результат, отметим параметр «Закрасить цветом» (Fill with color) и нажимаем Готово.

Мастеру Duplicate Remover требуется совсем немного времени, чтобы проанализировать вашу таблицу и показать результат:

Как видите, результат аналогичен тому, что мы наблюдали выше. Но здесь мы выделили дубликаты, включая и первое появление этих повторяющихся записей. Если вы выберете опцию удаления, то эти 4 записи будут стерты из вашей таблицы.

Надстройка также создает резервную копию рабочего листа, чтобы случайно не потерять нужные данные: вдруг вы хотели оставить первые вхождения данных, но случайно выбрали не тот пункт.

Мы рассмотрели различные способы, которыми вы можете убрать дубликаты из ваших таблиц — при помощи формул и без них. Я надеюсь, что хотя бы одно из решений, упомянутых в этом обзоре, вам подойдет.

Все мощные инструменты очистки дублей, описанные выше, включены в надстройку Ultimate Suite для Excel. Если вы хотите попробовать их, я рекомендую вам загрузить полнофункциональную пробную версию и сообщить нам свой отзыв в комментариях.

Что ж, как вы только что видели, есть несколько способов найти повторяющиеся значения в Excel и затем удалить их. И каждый из них имеет свои сильные стороны и ограничения. 

Еще на эту же тему:

Понравилась статья? Поделить с друзьями:
  • Excel delete all blank rows
  • Excel could not load some objects because they are not available on this machine
  • Excel del запятая вместо точки
  • Excel cos в степени
  • Excel decode utf 8