I am trying to run the following VBA script:
Sub FillTable()
Worksheets("Sheet3").Activate
Worksheets("Sheet3").Range("E5").Select
Worksheets("Sheet3").Range("E5").Formula = "XLOOKUP(B1,'Cleaned & Scored Data'!B2:B9,'Cleaned & Scored Data'!E2:E9)/XLOOKUP(B1,'Cleaned & Scored Data'!$B$2:$B$9,'Cleaned & Scored Data'!D2:D9)"
End Sub
And I am getting
"Run-time error 9: Subscript out of range".
It's been a while since I've used VBA. Can anyone jog my memory on what I am doing wrong? Thanks!!
I was expecting Cell E5 on Sheet3 to be filled with the results of the formula, but instead got the error.