Article ID: 237188 - Last Review: August 27, 2002 - Revision: 1.0 XL97: SUMIF, COUNTIF, COUNTBLANK Return #VALUE! ErrorThis article was previously published under Q237188 For a Microsoft Excel 2000 and later version of this article, see 260415
(http://support.microsoft.com/kb/260415/EN-US/
)
.
For a Microsoft Excel 98 version of this article, see 179029 (http://support.microsoft.com/kb/179029/EN-US/ ) . On This PageSYMPTOMS
A formula that contains the SUMIF, COUNTIF, or COUNTBLANK function may
return the #VALUE! error.
CAUSE
This problem occurs when the formula that contains the SUMIF, COUNTIF, or
COUNTBLANK function refers to cells in a closed workbook. NOTE: If you open the referenced workbook, the formula works correctly. WORKAROUND
To work around this problem, use a combination of the SUM and IF functions
together in an array formula.
ExamplesNOTE: You must enter each formula as an array formula. To enter a formula as an array formula in Microsoft Excel for Windows, press CTRL+SHIFT+ENTER.SUMIFInstead of using a formula that is similar to the following
=SUMIF([Source]Sheet1!$A$1:$A$8,"a",[Source]Sheet1!$B$1:$B$8)
use the following formula:
=SUM(IF([Source]Sheet1!$A$1:$A$8="a",[Source]Sheet1!$B$1:$B$8,0))
COUNTIFInstead of using a formula that is similar to the following
=COUNTIF([Source]Sheet1!$A$1:$A$8,"a")
use the following formula:
=SUM(IF([Source]Sheet1!$A$1:$A$8="a",1,0))
COUNTBLANKInstead of using a formula that is similar to the following
=COUNTBLANK([Source]Sheet1!$A$1:$A$8)
use the following formula:
=SUM(IF([Source]Sheet1!$A$1:$A$8="",1,0))
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. MORE INFORMATION
The SUMIF function uses the following syntax:
=SUMIF(range, criteria, sum_range).
REFERENCES
For more information about a wizard that can help you create these functions, click the Office Assistant, type conditional sum wizard, click Search, and then click to view "Summarize values in a list that meet specific conditions by using the Conditional Sum Wizard." For more information about array formulas, click the Office Assistant, type array formulas, click Search, and then click to view "About array formulas and how to enter them." NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If Microsoft Help is not installed on your computer, click the article number below to view the article in the Microsoft Knowledge Base: 120802
(http://support.microsoft.com/kb/120802/EN-US/
)
Office: How to Add/Remove a Single Office Program or Component | Article Translations
|

Back to the top
