I have form with three text to put this values on same row to different column. this works fine. I have created this function to verify if combination of text1 and text2 exists on some row yet. but it verify only the first of condition.
Function kontr() As Boolean
Dim endRow As Long
endRow = ActiveSheet.Range("C:C").End(xlUp).Row
For i = 1 To endRow
If (ActiveSheet.Range("C" & i).Value <> UserForm1.TextBox1.Text And ActiveSheet.Range("F" & i).Value <> UserForm1.TextBox2.Text) Then
kontr = True
Else
MsgBox ("Exists!")
kontr = False
End If
Next i
End Function
can someone help with this?