Hi Vishal follow below mention steps
1. Select your column A:A 2. Go to Data Validation 3. Click on settings 4. Choose custom from drop down list 5. Enter the formula as =IF(COUNTIF(A:A,A1)>1,FALSE,TRUE) 6. Click Error Alert tab , check or select show error alert box 7. choose stop from style drop down list 8. Enter title or error message or you can use below mention macro to remove duplicate Sub RemoveDuplicate() Cells.Sort Key1:=Range("A1") totalrows = ActiveSheet.UsedRange.Rows.Count For Row = totalrows To 2 Step -1 If Cells(Row, 1).Value = Cells(Row - 1, 1).Value Then Rows(Row).Delete End If Next Row End Sub On Sun, Jun 6, 2010 at 2:04 PM, Vishal Gupta <vgsca.19802...@gmail.com>wrote: > Hello All, > I need a command or code in excell. > I want names written in a coloumn sholud not be repeated, error msg > shouldbe generated when someone writes a duplicate entry. > Plz help me > > regards > Vishal Gupta > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > HELP US GROW !! > > We reach over 7000 subscribers worldwide and receive many nice notes about > the learning and support from the group.Let friends and co-workers know they > can subscribe to group at > http://groups.google.com/group/excel-macros/subscribe > -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 7000 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe