|
Current Special! Complete Excel
Excel
Training Course
for Excel 97 - Excel 2003, only $145.00.
$59.95 Instant
Buy/Download,
30 Day Money Back Guarantee & Free
Excel Help for LIFE!
Got any Excel Questions? Free Excel Help
See Also: Excel Data Validation || Excel Duplicates Manager || Find Duplicates in Excel || Compare Excel || Highlight Duplicates in Excel
If you are familiar with the
Excel Data Validation feature,
we can move into a great use for it! That is, prevent duplicates in
an Excel Spreadsheet.
Let us assume the range we want to prevent duplicates in is the range
A1:A100.
1) Select range A1:A100 Starting from A1. This will ensure
the active cell is A1
2) Go to Data>Validation and choose "Custom" from the
"Allow:" box on the "Settings" page.
3) In the box below type the formula as show below;
=COUNTIF($A$1:$A$100,A1)=1
4) Optional: Click the "Input Message" page tab and enter a message that the users sees each time they select any cell that has this Validation applied.
5) Optional: Click the "Error
Alert" page tab and set the level according to the list below
a)
Stop: No user will be allowed to enter data that already
exists. They will have the choice to Retry or Cancel.
b)
Warning: User will be allowed to enter data that already
exists, but only after confirming the entry by clicking "Yes" on the
message box they are shown when entering duplicate data. The default
button is the "No" button and they also have the choice of clicking
"Cancel"
c) Information: User will be allowed to enter duplicates after
confirming the entry by clicking "OK" on the message box they are shown
when entering duplicate data. The default button is the "OK" button and
they also have the choice of clicking "Cancel".
Once we have done this, we simply click
OK and we are done. Now
test it by entering duplicate data.
Now, it is not possible to enter the same data twice in the range
A1:A100. It is important to note the Absolute of $A$1:$A$100
in the COUNTIF function and that the single reference (A1) is
a Relative reference. This is why step 1 states to Start from A1
(in this case) ensuring A1 becomes the active cell. The COUNTIF
formula in the Data Validation for A2 will change automatically
to;
=COUNTIF($A$1:$A$100,A2)>1
Note the $A$1:$A$100 never changes due to the use of Absolute
on both the column ("A") and the rows (1:100).
Download a
Workbook Showing Data Validation
See Also: Excel Data Validation || Excel Duplicates Manager || Find Duplicates in Excel || Compare Excel || Highlight Duplicates in Excel
Excel Dashboard Reports & Excel Dashboard Charts 50% Off Become an ExcelUser Affiliate & Earn Money
Special! Free Choice of Complete Excel Training Course OR Excel Add-ins Collection on all purchases totaling over $64.00. ALL purchases totaling over $150.00 gets you BOTH! Purchases MUST be made via this site. Send payment proof to [email protected] 31 days after purchase date.
Instant Download and Money Back Guarantee on Most Software
Excel Trader Package Technical Analysis in Excel With $139.00 of FREE software!
Microsoft � and Microsoft Excel � are registered trademarks of Microsoft Corporation. OzGrid is in no way associated with Microsoft
Some of our more popular products are below...
Convert Excel Spreadsheets To Webpages | Trading In Excel | Construction Estimators | Finance Templates & Add-ins Bundle | Code-VBA | Smart-VBA | Print-VBA | Excel Data Manipulation & Analysis | Convert MS Office Applications To...... | Analyzer Excel | Downloader Excel
| MSSQL Migration
Toolkit |
Monte Carlo Add-in |
Excel
Costing Templates