{"id":5977,"date":"2016-07-20T09:11:54","date_gmt":"2016-07-20T09:11:54","guid":{"rendered":"http:\/\/test.nurturetechacademy.in\/?p=5977"},"modified":"2016-08-01T09:57:48","modified_gmt":"2016-08-01T09:57:48","slug":"how-to-prevent-duplicate-values-in-a-range","status":"publish","type":"post","link":"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/how-to-prevent-duplicate-values-in-a-range\/","title":{"rendered":"How to Prevent duplicate values in a range"},"content":{"rendered":"<p>How to Prevent Duplicate values through Data Validation<\/p>\n<p>&nbsp;<\/p>\n<p>In this post we will see how we can prevent\/stop any range to accept any duplicate values. We all know the power of Data Validation. We can do a lot of stuff through Data validation e.g. we can restrict cells to accept any number of any specific digits, we can assign any specific text length which can be accepted by a particular range, we can create a drop-down list in a cell etc\u2026.<\/p>\n<p>Now, to prevent any duplicate values we\u2019ll again knock the door of Data Validation.<\/p>\n<p>Let\u2019s take an example; here we want to enter some employee\u2019s data of a company. The first thing which we need to put in is Employee ID. As we know that Employee ID is unique in nature i.e. a unique Employee ID is assigned to each employee.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6057 size-full\" src=\"http:\/\/test.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/1-1.jpg\" alt=\"1\" width=\"287\" height=\"344\" srcset=\"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/1-1.jpg 287w, https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/1-1-250x300.jpg 250w\" sizes=\"auto, (max-width: 287px) 100vw, 287px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong><u>Step1:<\/u>\u00a0\u00a0 <\/strong>Select the range of cells on which we need to apply the data validation.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6058 size-full\" src=\"http:\/\/test.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/2-1.jpg\" alt=\"2\" width=\"181\" height=\"293\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong><u>Step2:<\/u>\u00a0\u00a0 <\/strong>Go to Data Tab -&gt;\u00a0Data Validation.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6059 size-full\" src=\"http:\/\/test.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/3-1.jpg\" alt=\"3\" width=\"507\" height=\"122\" srcset=\"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/3-1.jpg 507w, https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/3-1-300x72.jpg 300w\" sizes=\"auto, (max-width: 507px) 100vw, 507px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong><u>Step3:<\/u>\u00a0\u00a0 <\/strong>A Data Validation dialog box will appear. In this box under the settings tab -&gt;\u00a0Allow: -&gt;\u00a0Custom.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6060 size-full\" src=\"http:\/\/test.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/4-1.jpg\" alt=\"4\" width=\"412\" height=\"330\" srcset=\"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/4-1.jpg 412w, https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/4-1-300x240.jpg 300w\" sizes=\"auto, (max-width: 412px) 100vw, 412px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong><u>Step4:<\/u>\u00a0\u00a0 <\/strong>When we choose custom, just below that we have a Formula input box. Here we will use Countif formula. <em>(Let me just take few words to explain this formula to those who don\u2019t use it, here countif will keep a check on the number of times an entry is coming. If any entry repeats more then once, a message box will appear to show the error). <\/em>The formula will be written as =COUNTIF($A$2:$A$12,A2)=1<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6061 size-full\" src=\"http:\/\/test.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/5-1.jpg\" alt=\"5\" width=\"398\" height=\"316\" srcset=\"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/5-1.jpg 398w, https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/5-1-300x238.jpg 300w\" sizes=\"auto, (max-width: 398px) 100vw, 398px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong><u>Step5:<\/u>\u00a0\u00a0 <\/strong>Now if we just press OK then Data validation will be applied and while entering Employee IDs, if the user put any Employee ID twice he\/she will get a default message from Excel but if we want to edit this message as per our requirement, we can go to Error alert tab in Data validation Dialog box.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6062 size-full\" src=\"http:\/\/test.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/6-1.jpg\" alt=\"6\" width=\"398\" height=\"316\" srcset=\"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/6-1.jpg 398w, https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/6-1-300x238.jpg 300w\" sizes=\"auto, (max-width: 398px) 100vw, 398px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong><u>Step6:<\/u>\u00a0\u00a0 <\/strong>Here we can edit the Title of the message in Title box and Error message in Error Message box.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6063 size-full\" src=\"http:\/\/test.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/7-1.jpg\" alt=\"7\" width=\"398\" height=\"316\" srcset=\"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/7-1.jpg 398w, https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/7-1-300x238.jpg 300w\" sizes=\"auto, (max-width: 398px) 100vw, 398px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong><u>Step7:<\/u>\u00a0\u00a0 <\/strong>Now press OK.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6055 size-full\" src=\"http:\/\/test.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/8-1.jpg\" alt=\"8\" width=\"488\" height=\"286\" srcset=\"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/8-1.jpg 488w, https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-content\/uploads\/2016\/07\/8-1-300x176.jpg 300w\" sizes=\"auto, (max-width: 488px) 100vw, 488px\" \/><\/p>\n<p>You can download the Excel file used for this post <a href=\"https:\/\/www.dropbox.com\/s\/j2lpj29e2ndqr7k\/How%20to%20Prevent%20duplicate%20values%20in%20a%20range.xlsx?dl=0\">here<\/a>&#8230;..<\/p>\n<p>&nbsp;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_5977\" class=\"pvc_stats all  \" data-element-id=\"5977\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>How to Prevent Duplicate values through Data Validation<br \/>\n&nbsp;<br \/>\nIn this post we will see how we can prevent\/stop any range to accept any duplicate values. We all know the power of Data Validation. We can do a lot of <\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_5977\" class=\"pvc_stats all  \" data-element-id=\"5977\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":6065,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[56],"tags":[71,62,72,57],"class_list":["post-5977","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-excel","tag-advanced-excel","tag-data-validation","tag-duplicate-values","tag-excel"],"_links":{"self":[{"href":"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-json\/wp\/v2\/posts\/5977","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-json\/wp\/v2\/comments?post=5977"}],"version-history":[{"count":7,"href":"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-json\/wp\/v2\/posts\/5977\/revisions"}],"predecessor-version":[{"id":6119,"href":"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-json\/wp\/v2\/posts\/5977\/revisions\/6119"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-json\/wp\/v2\/media\/6065"}],"wp:attachment":[{"href":"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-json\/wp\/v2\/media?parent=5977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-json\/wp\/v2\/categories?post=5977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nurturetechacademy.in\/dev.nurturetechacademy.in\/wp-json\/wp\/v2\/tags?post=5977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}