Hello I have a formula for index match it works for the first 6 columns and not for the 7th and 8th

=IFERROR(INDEX('[ServiceIn.xlsm]Customer Details'!$B$3:$G$1048576,MATCH(B3,'[ServiceIn.xlsm]Customer Details'!$B$3:$B$31000),7),"")

If I change the 7 at the end back to a 6 I get the previous column but it has an error when the formula has the 7 or 8 column

error is #REF there is data in the location

This formula works

=IFERROR(INDEX('[ServiceIn.xlsm]Customer Details'!$B$3:$G$1048576,MATCH(B3,'[ServiceIn.xlsm]Customer Details'!$B$3:$B$31000),6),"")