View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
princess[_4_] princess[_4_] is offline
external usenet poster
 
Posts: 1
Default VBA - Preventing duplicate entries using a macro

I have a spreadsheet containing bookings for a cinema. There are 5
different types of seats available (Normal Adult, Child, Member,
Student and Senior Citizen) (See attached file for screenshot of
worksheet).

I need to create a macro (I am not allowed to use the Validation
function) to check that each seat type has been entered in column E
(cells E16 to E20) only once, e.g. only one entry for Member.

If duplicates have been entered, a message box should appear informing
the user of this, and then the duplicate seat types (and their
corresponding quanties in column G) should be deleted.

I need to create this using a simple Excel macro (e.g. something like
an IF statement or similar).

If anyone could help I would be extremely grateful. I have been trying
for hours with no success.

Thanks in advance!

Attachment filename: princessexcel.jpg
Download attachment: http://www.excelforum.com/attachment.php?postid=416046
---
Message posted from http://www.ExcelForum.com/