How to Remove Duplicates in Google Sheets Without Shifting Cells

When you have a large dataset, it is possible to have duplicate entries in the dataset. The duplicates may sometimes lead to unwanted errors in calculation. Removing duplicates even from a small dataset may become very tiring and time-consuming. To combat that, Google Sheets provides some easy solutions. In this article, we will try to show you how to remove duplicates in Google Sheets without shifting cells.


A Sample of Practice Spreadsheet

Download this spreadsheet to practice yourself.


3 Ways to Remove Duplicates in Google Sheets Without Shifting Cells

1. Using COUNTIF Function

Duplicates can be removed without shifting or moving the cells they are in by applying the IF function with the COUNTIF function in Google Sheets. We have a dataset with some Product Names and their Price in it. We will remove the duplicates and only show the unique entries in a separate column.

dataset for removing duplicates with the countif function for how to remove duplicates in google sheets without shifting cells

Steps:

  • Go to the first cell of the column where you want to show the unique names. We go to cell D5 of our example.

select cell to remove duplicates using countif function

  • Then, insert the IF function.

insert if function to remove duplicates

  • Now, insert the COUNTIF function.

insert countif function

  • After that, type the range that you want the COUNTIF function to count the number of occurrences. We type $B$5:B5.

insert range for countif function to remove duplicates without shifting cells in google sheets

  • Next, type in the criterion based on which you want the COUNTIF function to count. We type B5.

insert criterion

  • Then type =1 as you want the data to show that it occurs only once.

insert condition

  • Now, type the value or data that you want the IF function to show if it matches the count of 1. We type B5 as we want to show the text in cell B5 to show.

insert true value for if function

  • After that, type the value or data that you want the IF function to show if the count is not equal to 1. We type “” as we want the formula to return a blank cell if the count is not equal to 1.

insert false value for if condition

  • The final formula is:
=IF(COUNTIF($B$5:B5,B5)=1,B5,"")

final formula to remove duplicates using countif function without shifting cells in google sheets

  • Finally, press ENTER and drag the autofill icon at the bottom of the cell to copy the formula to the cells below with the fill handle and it’ll show a list of unique names.

final dataset after removing duplicates using countif function

Read More: How to Remove Duplicates in a Column in Google Sheets (5 Ways)


2. Applying Filter Feature

The Filter feature can also be used to remove duplicates from datasets in Google Sheets. We use the following dataset for this.

dataset for removing duplicates with filter in google sheets

Steps:

  • First, go to the first cell of a new column named the Formula Column of the dataset. For our example, we go to cell D5.

select cell

  • Then, type the formula:
=B4=B5

insert formula to remove duplicate with filter in google sheets

  • After that, drag the autofill handle down to copy this to the other cells of the column. This will show a TRUE or FALSE result.

use autofill handle to copy this to the other cells

  • Now, select the entire data range including the newly created Formula Column, and go to Menu bar > Data > Create a filter. We select range B4:D16.

select create a filter

  • You will see the filter icon next to the column headings.

filter icon

  • Click on the filter icon on the formula column and check TRUE from the filtering options and click OK.

check true option in the filter menu

  • Now, select the names in the Product names column.

select column

  • Then, delete these names by pressing the DELETE button.

delete column

  • After that, click on the filter icon on the formula column and check both TRUE and FALSE, and then click OK.

check true and false

  • Now, you will see that only the unique Product names remain.

final result after applying filter to remove duplicates in google sheets

Note: You can hide the formula column after the duplicates have been removed or deleted.
Note: This method only works when you have duplicates in adjacent column cells. If the duplicates are scattered, then this method will not produce the desired result.

Read More: Google Sheets Use Filter to Remove Duplicates in Column


3. Utilizing Conditional Formatting

Conditional Formatting is a great tool that you can utilize to remove duplicates from your dataset.

Steps:

  • First, select the data table and go to Menu bar > Format > Conditional formatting.

select conditional formatting

  • You will see a side panel appear on the right named Conditional format rules.

conditional formatting side panel

  • Then, select Custom formula is from the Format cells if drop-down menu.

select custom formula is

  • Now, type the following formula in the Value or formula box:
=COUNTIF($B$5:B5,B5)>1

insert custom formula with conditional formatting to remove duplicates without shifting cells in google sheets

Formula Explanation:

  • B5:B5 is the cell range of the COUNTIF function.
  • B5 is the criterion of the COUNTIF function based on which the Conditional formatting will apply the formatting.
  • >1 implies that Conditional formatting will be applied to any cells that are greater than 1.
  • Next, select white font color as well as white fill color from the Formatting style menu.

select custom white fill color

  • Finally, press Done to remove the duplicates without shifting cells.

press done for conditional formatting

  • This is how the final table looks:

final result after removing duplicate with conditional formatting without shifting cells in google sheets

Read More: How to Remove Duplicates in Google Sheets Using Formula


Conclusion

In this article, we showed you how to remove duplicates in Google Sheets without shifting cells in 3 different methods. Keep practicing the examples that we have shown here for a better understanding of the concept. We hope this article was useful to you.

Also, check out other articles on OfficeWheel to keep on improving your Google Sheets work knowledge.


Related Articles

Maruf Niaz

Maruf Niaz

My Name is Niaz. As a regular Google Sheets user, I have a good understanding of the users' needs and bad experiences. In my articles, I will share my knowledge which I hope, will be helpful to you. My latest educational degree was BSc in Textile Engineering from Bangladesh University of Textiles.

We will be happy to hear your thoughts

Leave a reply

OfficeWheel
Logo