#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Duplicates

Hello!
I am looking for a formula that prevents the entry of duplicates.
Not insert a value in cell B1 when the value already exists in column A.
Any idea?
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Duplicates

Right click sheet tabcopy paste this. Now when you put something in cell b1
it will be added to the end of column A UNLESS it already exists in column A

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < Range("b1").Address Then Exit Sub
If Not Columns(1).Find(Target) Is Nothing Then Exit Sub
Cells(Cells(Rows.Count, 1).End(xlUp).Row + 1, 1) = Target
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Dias" wrote in message
...
Hello!
I am looking for a formula that prevents the entry of duplicates.
Not insert a value in cell B1 when the value already exists in column A.
Any idea?
Thanks


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Duplicates

You could select B1
or select col B (if you want it applied similarly for the entire col)

then Click Data Validation
Allow Custom
Formula: =COUNTIF(A:A,B1)<1
Click Ok

Test it out
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,000 Files:370 Subscribers:66
xdemechanik
---
"Dias" wrote in message
...
Hello!
I am looking for a formula that prevents the entry of duplicates.
Not insert a value in cell B1 when the value already exists in column A.
Any idea?
Thanks



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Duplicates

Hi,

Choose Data, Validation, Custom and enter the following formula

=AND(B1<A:A)

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Dias" wrote:

Hello!
I am looking for a formula that prevents the entry of duplicates.
Not insert a value in cell B1 when the value already exists in column A.
Any idea?
Thanks



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 144
Default Duplicates

Hi Shane

its doesn't seem to work when I test it


--
HTH

Pls provide your feedback by clicking the YES button below if this posting
is helpful
This will help others to search the results in the archive better

cheers, francis


"Shane Devenshire" wrote in
message ...
Hi,

Choose Data, Validation, Custom and enter the following formula

=AND(B1<A:A)

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Dias" wrote:

Hello!
I am looking for a formula that prevents the entry of duplicates.
Not insert a value in cell B1 when the value already exists in column A.
Any idea?
Thanks



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Duplicates

Hi!
Thanks everyone, the simple formula from Max, works perfect for me.
Regards
Dias

Max escreveu:
You could select B1
or select col B (if you want it applied similarly for the entire col)

then Click Data Validation
Allow Custom
Formula: =COUNTIF(A:A,B1)<1
Click Ok

Test it out

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Duplicates

Glad it worked. You're welcome.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,000 Files:370 Subscribers:66
xdemechanik
---
"Dias" wrote in message
...
Thanks everyone, the simple formula from Max, works perfect for me.
Regards
Dias



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking up duplicates Mandy Excel Discussion (Misc queries) 8 November 22nd 08 05:49 AM
Condensing a list with duplicates to a list with non-duplicates Nuclear Excel Worksheet Functions 2 July 29th 08 08:03 PM
Duplicates in excel that aren't 100% DUPLICATES ... [email protected] Excel Discussion (Misc queries) 4 May 2nd 08 06:43 PM
duplicates He cries for help[_2_] Excel Discussion (Misc queries) 1 February 12th 08 07:43 AM
Duplicates Pammy Excel Discussion (Misc queries) 2 April 10th 07 11:00 AM


All times are GMT +1. The time now is 02:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"