以下是尝试使用工作表“annovar”中工作表“panel”中的验证的代码。谢谢你:)。
'添加其他选择信息
With Sheets("panel")
Dim LastRowNo As Long
LastRowNo = .Cells(Rows.Count, "J").End(xlUp).Row
formula = "=panel!$J$1:$J$" & lastrow
End With
Worksheets("annovar").Range("B2").formula = "=IFERROR(VLookup(A2,J1:K" & LastRowNo & ",2,0),"""")"
Worksheets("annovar").Range("C2").formula = "=IFERROR(VLookup(A2,J1:L" & LastRowNo & ",3,0),"""")"
Worksheets("annovar").Range("D2").formula = "=IFERROR(VLookup(A2,J1:M" & LastRowNo & ",4,0),"""")"
Worksheets("annovar").Range("E2").formula = "=IFERROR(VLookup(A2,J1:N" & LastRowNo & ",5,0),"""")"
Worksheets("annovar").Range("F2").formula = "=IFERROR(VLookup(A2,J1:O" & LastRowNo & ",6,0),"""")"