Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Checking for duplicate entries | Excel Discussion (Misc queries) | |||
Checking for Duplicate entry using VBA (?!) | Excel Programming | |||
Duplicate Checking in Excel | Excel Programming | |||
Checking for duplicate data | Excel Programming | |||
checking for duplicate worksheets | Excel Programming |