This formula works, but I cant get the VBA to work. What am I doing wrong?


=INDEX(Store!EM17:EY100000,MATCH("01 Total"&"Contracted",INDEX(Store!EP17:EP100000&Store!EN17:EN100000,0),0),MATCH("Moves Out",Store!EM17:EY17,0))


Sheets("SC").Range("AG146").Value = Application.Index(Sheets("Store").Range("EM17:EY100000"), Application.Match("01 Total" & "CONTRACTED", Application.Index(Sheets("Store").Range("EP17:EP100000") & Sheets("Store").Range("EN17:EN100000"), 0), 0), Application.Match("Moves Out", Sheets("Store").Range("EM17:EY17"), 0))