Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel macro - Help with duplication validation macro
I have created a spreadsheet which records seat types for cinem
bookings (e.g. adult, child, student, senior citizen, member). I need to create a macro to check that each seat type has only bee entered once. If this is not the case then the macro also needs to inform the use (e.g. through a message box) of the problem, and then be able to delet any duplicate entries. Could anyone please give me some ideas of the vb code I can use to b able to do this? Thanks for your help -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel macro - Help with duplication validation macro
download my file: no a11
from www.pexcel.com and go to vba example. you need to see the code. --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel macro - Help with duplication validation macro
Thanks for your help but this doesn't seem to be implemented using a
macro (I am not able to use any other method than a macro). --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel macro - Help with duplication validation macro
Did you download the file i told you..
the code is in worksheet change event.. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub On Error GoTo err1 If Application.WorksheetFunction.CountIf(Range("a:a") , Target) 1 Then Target = "" Target.Select MsgBox "Duplicate Entry." End If err1: End Sub this the code i am using. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 + macro for validation | Excel Discussion (Misc queries) | |||
Stopping duplication within Data validation | Excel Worksheet Functions | |||
Duplication Macro | Excel Discussion (Misc queries) | |||
Remove Duplication from Validation List? | Excel Discussion (Misc queries) | |||
Remove duplication from validation list? | Excel Worksheet Functions |