我有下面的代码,我不明白为什么会出现运行时错误1004:应用程序定义的错误或对象定义的错误。
Sub INCA_tabel()
Dim lastrow As Long
Sheets("Calibr").Activate
lastrow = Cells(Rows.count, 2).End(xlUp).Row
Range("B2:B" & lastrow).Select
Selection.copy
Sheets("INCA").Select
Range("C3:C" & lastrow).PasteSpecial Paste:=xlPasteValues
Sheets("INCA").Activate
lastrow = ActiveSheet.Cells(Rows.count, "C").End(xlUp).Row
ActiveSheet.Range("B2:B" & lastrow).Formula = "=LOOKUP(C3; Calibr!B:B; Calibr!C:C)" <-- here is the issue
ActiveSheet.Cells(lastrow, "A").value = "INCA_Read"
End Sub
谢谢!
答案 0 :(得分:0)
替换;与,
ActiveSheet.Range("B2:B" & lastrow).Formula = "=LOOKUP(C3, Calibr!B:B, Calibr!C:C)"