Mohon pencerahannya para master.
Update data antar sheet ketika pakek number tidak sukses, mohon pencerahannya
contoh seperti file terlampir
Private Sub CommandButton1_Click()
Dim id As Integer
Dim form2 As String
Dim Source As Worksheet, Target As Worksheet
Dim ItsAMatch As Boolean
Dim i As Integer
Set Source = ThisWorkbook.Worksheets("Sheet1")
Set Target = ThisWorkbook.Worksheets("Sheet2")
id = Source.Range("B2")
update = Source.Range("C2")
Do Until IsEmpty(Target.Cells(2 + i, 2))
If Target.Cells(2 + i, 3) = id Then
ItsAMatch = True
Target.Cells(2 + i, 7) = update
Exit Do
End If
If ItsAMatch = False Then
MsgBox "Data tidak ditemuka"
End If
Set Source = Nothing
Set Target = Nothing
End Sub