Hi i have an code in combobox9 and i want also to update in column H when selected the names from the combobox9 and again update column H if the same person name found from the combobox on a new raw.
this is what i have so far and need some help. it needs to continue to look for the person name which is in column C and it need to check if that raw it is not already completed on column H until it finds a blank cell against the same person name.
hope i am making sense in here
this is what i have so far and need some help. it needs to continue to look for the person name which is in column C and it need to check if that raw it is not already completed on column H until it finds a blank cell against the same person name.
VBA Code:
If Me.ComboBox9.Value <> "" Then
If VBA.CVar(Application.Match(VBA.CVar(Me.ComboBox9.Value), sh.Range("C:C"), 0)) = True Then
MsgBox "Record Not found for this PO-Number", vbCritical
Exit Sub
Else
i = Application.Match(VBA.CStr(Me.ComboBox9.Value), sh.Range("C:C"), 0)
End If
lCol = Me.ComboBox9.Value
Set findvalue2 = sh.Range("C:C").Find(What:=lCol, LookIn:=xlValues)
If Not findvalue2 Is Nothing Then
adr = findvalue2.Address
Do
If findvalue2.Offset(0, -1).Value = Me.TextBox19 Then
sh.Unprotect "Bhaji2020"
findvalue2.Offset(0, 6).Value = Me.TextBox19.Value = ""
Exit Do
End If
Set findvalue2 = sh.Range("C:C").FindNext(findvalue2)
Loop While findvalue2.Address <> adr
Set findvalue2 = Nothing
End If
hope i am making sense in here