Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Duplicate Function

Hi,

I have a data below and I want to creat a function to tell me if the number
I am working on is a duplicate or not. How do I do this?

1
2
3
4
1
4
3


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Duplicate Function

=IF(COUNTIF(A$1:A$7,A1)1,"Duplicate","Notduplicat e")
--
David Biddulph

"Manni" wrote in message
...
Hi,

I have a data below and I want to creat a function to tell me if the
number
I am working on is a duplicate or not. How do I do this?

1
2
3
4
1
4
3




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,071
Default Duplicate Function

What do you mean by "if the number I am working on"? What constitutes
"working on"? Do you mean the number you just entered? If that's the case
then you will need VBA. The following macro will check all the cells in
A1:G20 if a number (or any value) is entered in any cell in A1:G20. Change
the range as needed. You MUST place this macro in the sheet module of your
sheet. To access that module, right-click on the sheet tab and select View
Code. "X" out of the module to return to your sheet. HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Not Intersect(Target, Range("A1:G20")) Is Nothing Then
If Application.CountIf(Range("A1:G20"), Target.Value) 1 Then
MsgBox "That's a duplicate.", 16, "Duplicate"
End If
End If
End Sub

"Manni" wrote in message
...
Hi,

I have a data below and I want to creat a function to tell me if the
number
I am working on is a duplicate or not. How do I do this?

1
2
3
4
1
4
3



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
Using Match function with duplicate values in an array Richard Excel Worksheet Functions 3 April 22nd 23 07:45 PM
Duplicate Numbers when using the Large Function. jeel Excel Worksheet Functions 11 February 1st 08 03:53 AM
How do you delete duplicate addresses, but keep duplicate names? Shelly Excel Discussion (Misc queries) 1 August 28th 06 10:36 PM
Function to find duplicate values, then delete Cam Excel Worksheet Functions 1 January 27th 06 01:38 AM
duplicate Metalteck Excel Discussion (Misc queries) 2 May 11th 05 10:04 PM


All times are GMT +1. The time now is 11:23 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"