Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Always like to try and simplify code if possible.
Private Sub Worksheet_Change(ByVal Target As Excel.Range) Dim i As Long, x As Variant On Error GoTo end1 If Intersect(Target, [C8:C19]) Is Nothing Or Evaluate _ ([Sum(if(C8:C19<"",1/countif(C8:C19,C8:C19)))]) _ = [Count(C8:C19)] Then End Application.EnableEvents = False x = Target.Cells(1).Value For i = 8 To 19 If Cells(i, 3).Value = x And i _ < Target.Row Then Cells(i, 3).Value = "" Next i end1: Application.EnableEvents = True End Sub Regards Robert McCurdy "Niko" wrote in message ... Thank you, that is very interesting. I did not know these methods. Validation is more flexible than I thought! However, for my target group I think it is preferable that they are able to insert a value that has already been used. If they do, the former value simply disappears. This cannot be done (i think) using validation. My procedure does it. So perhaps you (or someone else) know a way to just simplify my procedure? Niko "Ron de Bruin" schreef in bericht ... Why don't you use this Niko http://www.cpearson.com/excel/NoDupEntry.htm -- Regards Ron de Bruin http://www.rondebruin.nl |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simplified SUMIF Needed | Excel Discussion (Misc queries) | |||
Simplified Date Entry? | Excel Discussion (Misc queries) | |||
looking for simplified formulas | Excel Worksheet Functions | |||
Can this be simplified | Excel Worksheet Functions | |||
Simplified Help | Excel Programming |