XL: FREQUENCY() Returns Zeroes When Entered as Horizontal Array

Last reviewed: February 2, 1998
Article ID: Q129774

The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for Windows 95, versions 7.0, 7.0a
  • Microsoft Excel 97 for Windows
  • Microsoft Excel for the Macintosh, version 5.0
  • Microsoft Excel for Windows NT, versions 5.0, 5.0a
  • Microsoft Excel 98 Macintosh Edition

SYMPTOMS

If the FREQUENCY function is entered as a horizontal array, regardless of the orientation of the data array or the bins array, the function returns zeros (0).

CAUSE

This problem occurs as a result of the way the FREQUENCY function processes data.

WORKAROUND

To work around this problem, nest the FREQUENCY function inside the TRANSPOSE function as in the following example.

Example

  1. Type the following information into a worksheet:

          A1:  79     B1: Bins
          A2:  85     B2: 70
          A3:  78     B3: 79
          A4:  85     B4: 89
          A5:  83     B5:
          A6:  95     B6:
          A7:  88     B7:
          A8:  97     B8:
    
    

  2. Select cells C1:F1 and type the following formula:

          =TRANSPOSE(FREQUENCY(A1:A8,B2:B4))
    

    NOTE: The above formula must be entered 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.

The returned results are as follows:

   C1:  0   D1:  2   E1:  4   F1:  2


Additional query words: 5.00 5.00a 5.00c 7.00 7.00a 97 98 XL98 XL97 XL7 XL5
Version : WINDOWS:5.0,5.0c,7.0,97; MACINTOSH:5.0,5.0a,98
Platform : MACINTOSH WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.