When I enter the following formula, I receive the following error:

"the specified formula cannot be entered because it uses more levels of nesting"

=IFERROR(INDEX('Complex Query 4.xlsx'!$AB$2:$AB$1008,MATCH($B7&( LEFT(J$6,2)&TEXT(LEFT(SUBSTITUTE(SUBSTITUTE(LEFT(J$6,FIND(" ",J$6&" ")-1),LEFT(J$6,2),""),"-",REPT(" ",10)),10),"000")&"-"&TEXT(RIGHT(SUBSTITUTE(SUBSTITUTE(LEFT(J$6,FIND(" ",J$6&" ")-1),LEFT(J$6,2),""),"-",REPT(" ",10)),10),"000")),'Complex Query 4.xlsx'!$E$2:$E$1008&'Complex Query 4.xlsx'!$A$2:$A$1008,0)),"")
How can I change this code to make it work?