Private Sub CommandButton1_Click()
q = Cells(8, 4)
Set Rng = Sheets("表二").Range("B:B").Find(q)
If Rng Is Nothing Then
Cells(9, 4) = "该日期不存在"
Else
Cells(9, 4) = Rng.Row
End If
End Sub
Private Sub CommandButton1_Click()
q = Cells(8, 4)
Set Rng = Sheets("表二").Range("B:B").Find(q)
If Rng Is Nothing Then
Cells(9, 4) = "该日期不存在"
Else
Cells(9, 4) = Rng.Row
End If
End Sub