Excel: How to Use the Sieve Macro to Find Prime Numbers

ID: Q58543


The information in this article applies to:
  • Microsoft Excel for the Macintosh, versions 2.2, 3.0, 4.0


SUMMARY

A macro sheet named Sieve is included with the "Microsoft Excel Technical Reference for the Macintosh" manual on the Technical Reference Guide disk in the "Macro Examples" folder.

The Sieve macro is designed to find all of the prime numbers between 0 and a maximum that the user supplies. A prime number is any number that can only be divided evenly by itself and 1.

To operate the macro, follow these instructions:

  1. Open the file called "Sieve".


  2. Press COMMAND+OPTION+P (or choose Run from the Macro menu, select Sieve!Primes, and click OK).


  3. Input the maximum whole number at the prompt. Press RETURN or click OK.


  4. At the next prompt, click OK to watch the macro work or Cancel to continue without watching the macro work.


Additional query words: 2.20 3.0 4.00 macrosheet

Keywords :
Version :
Platform :
Issue type :


Last Reviewed: March 15, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.