Say you have a a huge spreadsheet containing one or multiple columns and you want to suppress duplicating values in a given column and replace those values with blank cells. This can be done using the formula below:
=IF(COUNTIF($A$1:A1,A2),"",A2) Explanation: This formula functions by comparing cells with the subsequent cell and wherever a similarity is spotted a blank cell will be displayed, otherwise the subsequent dissimilar cell will be displayed. In this formula, the nested COUNTIF statement is used in order to count the number of repeat cells, and wherever this number is equal to zero a value will be displayed. To demonstrate further, consider the example of a spreadsheet which contains "Order Dates" and "Order Numbers" where repeating "Order Dates" are prevalent. See the table below:
In order to replace the duplicating values (i.e.Order Dates) with blank cells, I added an addition column (i.e. column B) for Order Date, and I inputted the aforementioned formula in Cell B2. Afterwards, I applied the formula to the entire range by dragging it down. By doing so the repeating values are only being displayed once.
Note: you must have a header for your data otherwise the first value (i.e. cell B2) will also be left blank.
5 Comments
|
CategoriesArchives
June 2020
|