Đề Xuất 3/2023 # 7 Ways To Find And Remove Duplicate Values In Microsoft Excel # Top 9 Like | Beiqthatgioi.com

Đề Xuất 3/2023 # 7 Ways To Find And Remove Duplicate Values In Microsoft Excel # Top 9 Like

Cập nhật nội dung chi tiết về 7 Ways To Find And Remove Duplicate Values In Microsoft Excel mới nhất trên website Beiqthatgioi.com. Hy vọng thông tin trong bài viết sẽ đáp ứng được nhu cầu ngoài mong đợi của bạn, chúng tôi sẽ làm việc thường xuyên để cập nhật nội dung mới nhằm giúp bạn nhận được thông tin nhanh chóng và chính xác nhất.

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.

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.

The first image highlights all the duplicates based only on the Make of the car.

The second image highlights all the duplicates based on the Make and Model of the car. This results in one less duplicate.

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.

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.

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.

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

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.

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.

Check the box for Unique records only.

Press OK and you will eliminate the duplicate values.

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.

Select the Show in Tabular Form option.

Select the Repeat All Item Labels option.

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.

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.

You can also access this command from the Home tab ➜ Remove Rows ➜ Remove 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.

= 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 Rows ➜ Keep 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.

= [@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.

= 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.

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.

You can select to either highlight Duplicate or Unique values.

You can also choose from a selection of predefined cell formats to highlight the values or create your own custom format.

Select Filter by Color in the menu.

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?

Removing Duplicates In Excel 2003

Removing Duplicates in Excel 2003

In Excel 2003 you can only remove duplicates from a list if an entire row of data is duplicated.  In the diagram below we’ve highlighted the rows that Excel 2003 sees as duplicates:

The duplicate rows are shown here shaded in green.

Using the Advanced Filter

To start removing duplicates:

Either select the whole list of data, or just select a single cell within the list.

Filter…

Complete the dialog box as shown in the diagram below.

4. Choose whether to delete the duplicates from the original list (Filter the list in place) or copy the unique records to a new position (Copy to another location).

left with one copy of any duplicate rows in the list.

In Excel 2003 the duplicated data isn’t truly removed from the list, rather it is filtered out by hiding the rows containing duplicate values.  If you look at the row numbers on the left hand side of the diagram above you’ll notice that number 7 and number 11 are missing.

Because the duplicates aren’t actually removed from the list, you can easily bring them back again.  To do this:

Select the list or a single cell within the list.

You should find that you see all of the records again.

If you want to truly delete the duplicate values in Excel 2003, the easiest way to do it is to choose the option Copy to another location within the Advanced Filter dialog box.  This will copy the unique values to a different set of cells.  You can then delete the original list completely and then optionally copy the unique values back into the cells that were previously occupied by the original list.

What’s Next?

Deleting duplicates from the list is rather awkward in Excel 2003. Read the next part of this blog to see how easy the process is in Excel 2007 and 2010, or visit our Excel training page.

9 Ways To Copy And Paste As Values In Excel

Copying and pasting is a very frequently performed action when working on a computer. This is also true in Excel.

It’s so common that almost everyone knows the keyboard shortcuts to copy Ctrl + C and to paste Ctrl + V.

This can be frustrating as sometimes you’ll only want the values to copy and not any of the other stuff in the cells.

In this post, you’ll learn 8 ways to copy and paste only the values from your Excel data.

Example Data

Cell formatting including font colour, fill colour, number formatting and borders.

Notes.

SUM formula.

A data validation dropdown list.

Paste Special Keyboard Shortcut

If you want to copy and paste anything other than an exact copy, then you’re going to need to become familiar with paste special.

My favourite method to use this is with a keyboard shortcut.

Copy the data you want to paste as values into your clipboard.

Choose a new location in your workbook to paste the values into.

Press Ctrl + Alt + V on your keyboard to open up the Paste Special menu.

Select Values from the Paste option or press V on your keyboard.

Press the OK button.

Paste Special Legacy Keyboard Shortcut

This keyboard shortcut is a legacy shortcut from before the Excel ribbon command existed and it’s still usable.

Once the Paste Special menu is open you can then press V for Values.

Paste Special from the Home Tab

If you’re not a keyboard person and prefer using the mouse, then you can access the Paste Values command from the ribbon commands.

Select and copy the data you want to paste into your clipboard.

Select the cell you want to copy the values into.

Go to the Home tab.

Select the Values clipboard icon from the paste options.

Paste Values with Hotkey Shortcuts

Since the paste values command is in the ribbon, that also means you can access it with the Alt hotkeys.

Notice when you press the Alt key, the ribbon lights up with all the accelerator keys available.

Paste Values with Quick Access Toolbar Command

If it’s a command you use quite frequently, then why not put it in the quick access toolbar?

Depending where in the quick access toolbar you place it, it will also get it’s own easy to use Alt hotkey shortcut too.

Check out this post for details on how to add commands to the quick access toolbar, or this post on other interesting commands you can add to the quick access toolbar.

Select All Commands from the drop down list.

Locate and select Paste Values from the options. You can press P on your keyboard to quickly navigate to commands starting with P.

Press the Add button.

Use the Up and Down arrows to change the ordering of commands in your toolbar.

Press the OK button.

If you place it in the 4th position like in this Example, then you can you Alt + 4 to access it with a keyboard shortcut.

Paste Values Mouse Trick

Select the range of cells to copy.

Hover the mouse over the active range border until the cursor turns into a four directional arrow.

Select Copy Here as Values Only from the menu.

This is such a neat way, and there are a few other options in this hidden menu that are worth exploring.

Paste Values with Paste Options

There’s another sneaky method to paste values.

Paste Values and Formulas with Text to Columns

I don’t really recommend using this method, but I’m going add it just for fun.

A few caveats with this method.

You can only copy and paste one column of data.

It will keep any formulas.

If that’s exactly what you’re looking for, then this method might be of interest.

Select a single column of data ➜ go to the Data tab ➜ select the Text to Column command.

You can also select Fixed width as we won’t be using the text to column functionality it doesn’t really matter.

Paste Values with Advanced Filters

This one is another not-quite paste values option and is listed for fun as well.

With your data selected go to the Data tab then select the Advanced command in the Sort and Filter section.

Select Copy to another location.

Leave the Criteria range empty.

Select a location to place the copied data.

Press the OK button.

You can then remove the cell formatting that’s left by going to the Home tab ➜ Clear ➜ and selecting the Clear Formats option.

Conclusions

Wow! That’s a lot of different ways to paste data as values in Excel.

It’s understandable there are so many options given it’s an essential action to avoid carrying over unwanted formatting.

You’re eventually going to need to do this and there are quite a few ways to get this done.

What’s your favourite way? Did I miss any methods you use?

Lọc Dữ Liệu Trùng Trong Excel, Remove Duplicates On Excel 2022, 2013,

Với những danh sách sau nhiều lần gộp vào với nhau việc bị trùng dữ liệu là hoàn toàn có thể xảy ra. Vậy làm thế nào để lọc dữ liệu trùng trong Excel với phương thức chuẩn xác nhất, tránh bị thừa cũng như bị nhầm lẫn với danh sách đó. Hướng dẫn sau đây sẽ giúp bạn một cách để lọc dữ liệu bị trùng trong Excel 2019, 2016, 2013, 2010, 2007 và Excel 2003.

Lọc dữ liệu trùng nhau trong bảng tính Excel

Nhiệm vụ đơn giản thôi, hãy lọc dữ liệu bị trùng trong Excel với sheet hiện có. Bạn có thể thấy chúng tôi đã bôi đỏ dữ liệu bị trùng để bạn đọc dễ dàng nhận dạng và hiểu hơn.Bước 1: Để lọc dữ liệu bị trùng trong Excel trước tiên bạn cần phải khoanh vùng toàn bộ dữ liệu trong khu vực cần lọc hoặc là toàn bộ Sheet đó trước đã.

Lọc dữ liệu trùng trong Excel 2010, 2007

Chú ý Để sử dụng bộ lọc dữ liệu cho bảng tính, bạn cần sử dụng bộ Office 2007 trở lên.

Ví dụ: Tôi có một bản tính như hình bên dưới các dữ liệu trùng nhau được đánh dấu bằng màu đỏ. Bây giờ tôi muốn loại bỏ các dòng dữ liệu trùng nhau (tức là chỉ giữ lại 1 dòng dữ liệu)

Bước 2: Xuất hiện hộp thoại– Bạn có thể chọn lọc bản ghi theo tất cả các trường: chọn Select All

Trong đó:+ Select All: để chọn tất cả các trường trong bảng dữ liệu+ Unselect All: hủy chọn tất cả các trường trong bảng dữ liệu

– Bạn có thể chọn lọc bản ghi theo từng trường: Chọn Unselect All để hủy chọn tất cả, tick vào các cột bạn chọn để lọc dữ liệu như hình bên dưới và nhấn OK.

Bước 3: Sau khi nhấn OK sẽ xuất hiện hộp thoại thông báo là bạn đã loại bỏ được bao nhiêu dòng dữ liệu trùng và số dòng dữ liệu còn lại là bao nhiêu.

Kết quả: Bạn thấy những dòng dữ liệu trùng đã bị loại bỏ.

Đối với công cụ lọc dữ liệu trùng lặp này bạn sẽ thấy việc loại bỏ những dòng dữ liệu trùng đối với các bản ghi lớn rất dễ dàng, nó giúp bạn thao tác nhanh hơn, và tiết kiệm rất nhiều thời gian. Ngoài ra, bạn có thể tham khảo cách xuống dòng trong Excel để thực hiện việc tạo bảng tính dễ dàng hơn.

https://thuthuat.taimienphi.vn/loc-du-lieu-trung-nhau-trong-excel-1957n.aspx

Bạn đang đọc nội dung bài viết 7 Ways To Find And Remove Duplicate Values In Microsoft Excel trên website Beiqthatgioi.com. Hy vọng một phần nào đó những thông tin mà chúng tôi đã cung cấp là rất hữu ích với bạn. Nếu nội dung bài viết hay, ý nghĩa bạn hãy chia sẻ với bạn bè của mình và luôn theo dõi, ủng hộ chúng tôi để cập nhật những thông tin mới nhất. Chúc bạn một ngày tốt lành!