Forum Discussion

Bahram2200's avatar
Bahram2200
Copper Contributor
Apr 24, 2022

Countifs

Please help me find out, what is the problem with this formula?
I do not have a problem when I write the name of the reference file in the formula, but when the file name is placed in a cell and I give the name of the cell to the address, the formula does not work.

=COUNTIFS('[FGRB 5659684319.xlsx]B '!$Q$2:$Q$2000,">1400/09/30",'[FGRB 5659684319.xlsx]B '!$Q$2:$Q$2000,"<1400/12/30")

=COUNTIFS('[F50]B '!$Q$2:$Q$2000,">1400/09/30",'[F50]B '!$Q$2:$Q$2000,"<1400/12/30")
F50 => FGRB 5659684319.xlsx

1 Reply

  • Bahram2200 

    You need to use the INDIRECT function for that. It only works if the other workbook is open in Excel.

     

    =COUNTIFS(INDIRECT("'["&F50&"]B '!$Q$2:$Q$2000"),">1400/09/30",INDIRECT"'["&F50&"]B '!$Q$2:$Q$2000"),"<1400/12/30")

Resources