Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Excel 2003 + macro for validation Neil Holden Excel Discussion (Misc queries) 1 March 4th 10 10:53 AM
Stopping duplication within Data validation SNA400 Excel Worksheet Functions 1 February 5th 10 02:26 PM
Duplication Macro stew Excel Discussion (Misc queries) 0 February 19th 09 12:28 PM
Remove Duplication from Validation List? [email protected] Excel Discussion (Misc queries) 1 January 17th 06 02:27 AM
Remove duplication from validation list? [email protected] Excel Worksheet Functions 1 January 17th 06 02:15 AM


All times are GMT +1. The time now is 05:55 PM.

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"