LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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/

 
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
VBA Code macro for duplicate entries KCG Excel Discussion (Misc queries) 2 April 30th 08 06:58 AM
Macro for checking duplicate entries Ken[_2_] Excel Worksheet Functions 6 October 8th 07 12:17 PM
Preventing Duplicate Cells BenBlair Excel Discussion (Misc queries) 2 May 19th 05 06:08 PM
Preventing Duplicate Entries within a column Bruce Excel Discussion (Misc queries) 3 January 29th 05 12:33 AM
Preventing Duplicate Entries in rows AJPendragon Excel Worksheet Functions 1 December 6th 04 12:45 PM


All times are GMT +1. The time now is 08:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"