Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
If duplicate in range
Hello:
I have a range from A1:A50. I would like to have a code that if I enter an amount in a cell that is already included in another cell, then it should not let me, or notify me with msgbox. Thanks so much. Art |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
If duplicate in range
You can use the Worksheet function COUNTIF() to check..
Sub Macro() intNum = 50 If WorksheetFunction.CountIf(Range("A1:A50"), intNum) 0 Then MsgBox "Number already exist": Exit Sub End If End Sub If this post helps click Yes --------------- Jacob Skaria "art" wrote: Hello: I have a range from A1:A50. I would like to have a code that if I enter an amount in a cell that is already included in another cell, then it should not let me, or notify me with msgbox. Thanks so much. Art |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Identifying duplicate values in a range | Excel Discussion (Misc queries) | |||
Sorting a range with duplicate values | Excel Programming | |||
duplicate a range a specified number of times | Excel Programming | |||
No duplicate names in a range (A2:A200) | Excel Worksheet Functions | |||
Delete Duplicate rows in a range | Excel Programming |