In this article, we will learn how to flag the first duplicate in a range of values. Sometimes we need to identify the first duplicate from the other ones. Finding the first duplicate manually can be tedious or even impossible if you have thousands of rows of data. Don't worry, we have a formula that can mark the first duplicate easily in seconds.
For this article we will be required to use the COUNTIF function and IF function together.
fixed array: fixed array of values.
Value: value for which we need to find the first duplicates that need to be found.
expending_array : Its a referencing type, that extends when copied down.
Here we have the ID records with dates. We need to find the first and rest duplicates in the range separately.
Here the arguments to the function are fed using the cell reference.
Use the formula:
Here is the range that is given as array reference and value is given as cell reference. Press Enter to get the count.
As you can see from the first value returns, the first duplicate means this value as other duplicates. Now copy the formula in other cells using the drag down option or using the shortcut key Ctrl + D as shown below.
As you can see all the different duplicates are marked which proves the formula works fine.
Here are some observational notes shown below.
Hope this article about how to flag the first duplicate from the range in Excel is explanatory. Find more articles on COUNTIF functions here. If you liked our blogs, share it with your friends on Facebook. And also you can follow us on Twitter and Facebook. We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write us at email@example.com
How to use the SUMPRODUCT function in Excel: Returns the SUM after multiplication of values in multiple arrays in excel.
COUNTIFS with Dynamic Criteria Range : Count cells dependent on other cell values in Excel.
COUNTIFS Two Criteria Match : Count cells matching two different criteria on list in excel.
COUNTIFS With OR For Multiple Criteria : Count cells having multiple criteria match using the OR function.
The COUNTIFS Function in Excel : Count cells dependent on other cell values.
How to Use Countif in VBA in Microsoft Excel : Count cells using Visual Basic for Applications code.
How to use wildcards in excel : Count cells matching phrases using the wildcards in excel
50 Excel Shortcut to Increase Your Productivity : Get faster at your task. These 50 shortcuts will make you work even faster on Excel.
How to use the VLOOKUP Function in Excel : This is one of the most used and popular functions of excel that is used to lookup value from different ranges and sheets.
How to use the COUNTIF function in Excel : Count values with conditions using this amazing function. You don't need to filter your data to count specific values. Countif function is essential to prepare your dashboard.
How to Use SUMIF Function in Excel : This is another dashboard essential function. This helps you sum up values on specific conditions.
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.