我正在使用以下代码,但仅显示“失败”而不是评分。
Sub TABLEGRADESCELLREF()
Worksheets("TABLE").Activate
Range("C61").Select
Do Until ActiveCell.Offset(0, -2).Value = ""
ActiveCell.Formula = "=IF(R[0]C2=R61..CF DRT56Y7"
ActiveCell.Offset(1, 0).Select
Loop
End Sub
答案 0 :(得分:0)
这是适用于您的确切示例的代码。由于您没有提供更多详细信息,因此您可以根据自己的需要调整代码。希望对您有帮助。
@AutoMatter
答案 1 :(得分:0)
You can use Vlookup function to get your desired result
Please see the inputs from the below picture
then, try with below code
Sub TABLEGRADESCELLREF()
Dim i As Variant
Dim lastrow As Variant
Worksheets("TABLE").Activate
lastrow = Range("C61").End(xlDown).Row
For i = 61 To lastrow
Range("E" & i).Value = Application.WorksheetFunction.VLookup(Range("D" & i), Range("$J$61:$L$66"), 3, True)
Next i
End Sub
答案 2 :(得分:0)