Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 155
Default Checking for a duplicate value

Hi there,

I have a form which the user inputs values into various text and combo
boxes. When finished adding all information on teh form, the user clicks
submit, and the values are transferred to a sheet called 'HQ Input'. Each
row has a month field that the user selects from a combo box. There should
only be one row for each month.

Question:
When the user clicks 'Submit', i want excel to open the 'HQ Input' sheet,
loop through the existing rows and make sure the month to be inserted doesn't
already exist. If it does, i want to enable the user to either 'overwrite
the existing month row, or cancel the process.

Can anyone help on this?
--
Carlee
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Checking for a duplicate value

This may help, In the appropriate place in your Submit event:-

With Worksheets("YourSheetName").Range("XX:XX") ' Change as required
Set c = .Find(<date to find, lookin:=xlValues)
If c Is Nothing Then
' date is unique
Else
' date is not unique
End If
End With

h.

"Carlee" wrote:

Hi there,

I have a form which the user inputs values into various text and combo
boxes. When finished adding all information on teh form, the user clicks
submit, and the values are transferred to a sheet called 'HQ Input'. Each
row has a month field that the user selects from a combo box. There should
only be one row for each month.

Question:
When the user clicks 'Submit', i want excel to open the 'HQ Input' sheet,
loop through the existing rows and make sure the month to be inserted doesn't
already exist. If it does, i want to enable the user to either 'overwrite
the existing month row, or cancel the process.

Can anyone help on this?
--
Carlee

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
Checking for duplicate entries Daniel- Sydney Excel Discussion (Misc queries) 3 November 7th 06 09:16 AM
Checking for Duplicate entry using VBA (?!) Applewine[_3_] Excel Programming 4 August 21st 05 10:30 PM
Duplicate Checking in Excel anthony Excel Programming 2 September 3rd 04 08:21 PM
Checking for duplicate data Jeremy Excel Programming 2 April 28th 04 06:06 PM
checking for duplicate worksheets Rick B[_6_] Excel Programming 1 January 22nd 04 06:25 PM


All times are GMT +1. The time now is 06:44 AM.

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"