Ok then...
Firstly, I didn't know you had the same 1st column in each sheet and only the 1st row headers changed...that changes the formula slightly...
Secondly, not sure why the MatchTrue named range doesn't give correct result..so I say forget about it and I re-incorporated the MatchTrue formula into the main spreadsheet formula....see attached..
Formula in H5 is now:
=INDEX(INDIRECT("'"&INDEX(TabNames,MATCH(TRUE,COUNTIF(INDIRECT("'"&TabNames&"'!$A$1:$iu$1"),DATA!D5)>0,0))&"'!$A$1:$iu$500"),MATCH($C5,MILEAGE1!$A$1:$A$500,0),MATCH($D5,INDIRECT("'"&INDEX(TabNames,MATCH(TRUE,COUNTIF(INDIRECT("'"&TabNames&"'!$A$1:$iu$1"),DATA!D5)>0,0))&"'!$a$1:$iu$1"),0))
Don't forget to confirm with CSE key combo and then copy down.
Bookmarks