I am running into a problem using the COUNTIF function when the range parameter is in another workbook. First some setup info:
Excel 2003 - 2 workbooks open as follows:
TestA.xls has a single worksheet with the following values in column A:
1, 2, 3, 4, 3, 3 (A1 to A6)
TestB.xls has the following two formulas in 2 different cells:
=COUNTA([TestA.xls]Sheet1!$A$1:$A$6) (Value = 6)
=COUNTIF([TestA.xls]Sheet1!$A$1:$A$6,"3") (Value = 3)
No problem so far. When I now close TestA.xls (my data source workbook), my formulas in TestB.xls (correctly) change to:
=COUNTA('C:\TEMP\[TestA.xls]Sheet1'!$A$1:$A$6)
=COUNTIF('C:\TEMP\[TestA.xls]Sheet1'!$A$1:$A$6,"3")
BUT after forcing the values to update in TestB.xls (either use Edit - Links - Update Values OR close/re-open the file) the results show as:
6 (same/correct value when TestB was open)
#VALUE! (?? for the COUNTIF function)
To me it seems almost as if the COUNTIF function doesn't like references to closed workbooks (even though the Help indicates otherwise). I can go and re-open TestA.xls, update it, close it and my first formula above does correctly get updated (telling me the link IS working). My second formula remains #VALUE!
Searching here & Google yeilded nothing as of yet. My first post here, so I hope I've added sufficient detail (without breaking too many rules).
Excel 2003 - 2 workbooks open as follows:
TestA.xls has a single worksheet with the following values in column A:
1, 2, 3, 4, 3, 3 (A1 to A6)
TestB.xls has the following two formulas in 2 different cells:
=COUNTA([TestA.xls]Sheet1!$A$1:$A$6) (Value = 6)
=COUNTIF([TestA.xls]Sheet1!$A$1:$A$6,"3") (Value = 3)
No problem so far. When I now close TestA.xls (my data source workbook), my formulas in TestB.xls (correctly) change to:
=COUNTA('C:\TEMP\[TestA.xls]Sheet1'!$A$1:$A$6)
=COUNTIF('C:\TEMP\[TestA.xls]Sheet1'!$A$1:$A$6,"3")
BUT after forcing the values to update in TestB.xls (either use Edit - Links - Update Values OR close/re-open the file) the results show as:
6 (same/correct value when TestB was open)
#VALUE! (?? for the COUNTIF function)
To me it seems almost as if the COUNTIF function doesn't like references to closed workbooks (even though the Help indicates otherwise). I can go and re-open TestA.xls, update it, close it and my first formula above does correctly get updated (telling me the link IS working). My second formula remains #VALUE!
Searching here & Google yeilded nothing as of yet. My first post here, so I hope I've added sufficient detail (without breaking too many rules).