Home » excel » What is wrong with this Excel Formula?

What is wrong with this Excel Formula?

Posted by: admin May 14, 2020 Leave a comment


I have this formula =IF(G6="", "", CONCATENATE("[",INDIRECT(G6),"]","Sheet1","!$A1")).

It is reading excel file name from column G6, and then it read Column A from Sheet1.

This give invalid Cell Reference Error. Is there is something wrong with this?

How to&Answers:

This is what you need:

=IF(G6="", "", INDIRECT(CONCATENATE("'[",G6,"]Sheet1'!$A1")))

If G6 holds the text zipcodes-phoenixTEST.xlsx, then the formula is equivalent to


which will yield the value of cell A1 of Sheet1 of file zipcodes-phoenixTEST.xlsx


=IF(G6="", "", CONCATENATE("[",INDIRECT("G6"),"]",Sheet1!$A1))

You missed a double quote around G6


This one worked for me:

=IF(G6=""; ""; CONCATENATE("[";INDIRECT("G6");"]";Sheet1!$A1))

My Excel tells me I should use semicolons (;) in functions (althogh I do not have english version). Also you should not divide Sheet1 and address – they will only work when used together: Sheet1!$A1. This should also not be wrapped in “”.


I’ve done this in the past,

First you need to have the excel file that you are reading/searching for, open. Then you have to use INDIRECT after CONCATENATE:

INDIRECT(CONCATENATE("[", G6, "]", "Sheet1","'!$A1"))


You are forgetting ' before ! in "!$A1" should be "'!$A1"