XL: Some Worksheet Functions Don't Allow Array Constants |
In the versions of Microsoft Excel listed at the beginning of this article, you may receive one of the following error messages if you insert an array constant (such as {1,2}) into a SUMIF(), COUNTIF(), or COUNTBLANK() function:
Error in formula.
-or-
For example, you receive an error message if you use this function as in the following example:The formula you typed contains an error.
=SUMIF({1,2},2,{1,1})
This problem occurs because the SUMIF(), COUNTIF(), and COUNTBLANK() functions use the same criteria-matching algorithm as the database functions, such as DSUM(). This algorithm does not support arrays.
To work around this problem, use either of the following methods to enter the array.
=SUMIF(A1:A2,2,B1:B2)
=SUM(IF({1,2}=2,{1,1}))NOTE: You must enter this formula as an array formula. To enter a formula as an array formula in Microsoft Excel for Windows, press CTRL+SHIFT+ENTER. In Microsoft Excel for the Macintosh, press COMMAND+RETURN.
Additional query words: 97 7.0 5.0 XL97
Keywords : kbualink97 kbdta xlformula
Version : MACINTOSH:5.0; WINDOWS:5.0,5.0c,97; Win95:7.0; winnt:5.0
Platform : MACINTOSH Win95 WINDOWS winnt
Issue type : kbprb
Technology :
|
Last Reviewed: June 29, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |