Sub 判断写入() Dim wb1 As Workbook Dim wb2 As Workbook On Error Resume Next Set wb1 = Workbooks.Open("1工作簿路径") Set wb2 = Workbook.Open("好工作簿路径") If wb1.Sheets(1).[A1].Value = "好" Then wb2.Sheets(1).[A2].Value = wb1.Sheets(1).[A2].ValueEnd Sub