Hi,
A pleasant day!
I need anyone's expertise.
I'm using data validation to prevent duplicate entries. I'm using the below codes. I have a form where i input the data to a cell once i click save the below function will be called.
I have multiple criteria range that needs to be satisfy.
sorry i can't upload the file it exceeds the limit.
please help.
Thanks in advance.
nano
A pleasant day!
I need anyone's expertise.
I'm using data validation to prevent duplicate entries. I'm using the below codes. I have a form where i input the data to a cell once i click save the below function will be called.
I have multiple criteria range that needs to be satisfy.
Code:
Public Function dup() As Boolean
Range("C15:J38").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateCustom, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=countifs($C$15:$C$38,C15,$I$15:$I$38,I15,$J$15:$J$38,J15)<=1"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
dup = True
End With
End Function
please help.
Thanks in advance.
nano
Last edited by a moderator: