问题
Type mismatch error
Dim lr As Integer
lr = Range("A1").CurrentRegion.Rows.Count
Range("N2").Select
Range("N2").Formula = Application.WorksheetFunction.Index(Sheets("SMSv2").Range("A2:L" & lr), Application.Match(Sheets("SMSv2").Range("C2"), Sheets("SMSv2").Range("A2:A" & lr), False), 4)
回答1:
Dim lr As Integer
lr = Range("A1").CurrentRegion.Rows.Count
Range("N2").Select
Range("N2").Formula = "=INDEX(SMSv2!$A$2:$L$" & lr & ",MATCH(SMSv1!C2,SMSv2!$A$2:$A$" & lr & ",0),4)"
来源:https://stackoverflow.com/questions/60057812/type-mismatch-error-in-index-match-in-index-match-function