Excel: RANDOM() Needs Values for Variables, Points, and Seed

Last reviewed: November 4, 1994
Article ID: Q94215
The information in this article applies to:

    - Microsoft Excel for Windows, version 4.0, 4.0a, 5.0

SYMPTOMS

"Online Help" for version 5.0 and page 345 of the version 4.0 "Microsoft Excel Function Reference," state that the syntax for the RANDOM() function specifies that the variables, points and seed parameters are optional. If any of these parameters are omitted, the function returns an error message.

STATUS

Microsoft has confirmed this to be a problem in the versions of Microsoft Excel listed above. We are researching this problem, and will post more information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

When you use the RANDOM() function, the variables argument specifies the number of columns in the output range, the points argument specifies the number of rows in the output range, and the seed argument specifies an offset value used in determining which random numbers to retrieve. In Microsoft Excel for Windows, you must specify a value for each of these variables or you will receive the following error message when the RANDOM() function is evaluated in your macro:

   An error has occurred locating a support file or processing data for an
   add-in procedure

WORKAROUND

To work around this problem, specify these three parameters, as follows

   variables argument= COLUMNS(range)
   points argument= ROWS(range)
   seed argument= INT(RAND()*range) or any positive integer value

where range is the reference to the area on the worksheet where you want to place the random numbers.

REFERENCES

"Online Help," version 5.0 "Function Reference," version 4.0, pages 345-346 "User's Guide 2," version 4.0, pages 39-40


KBCategory: kbother
KBSubcategory:

Additional reference words: 4.0 4.00 4.0a 4.00a 5.0 5.00 optional argument
error random rnd


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: November 4, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.