Microsoft KB Archive/58543

{|
 * width="100%"|

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

 * }

-

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 &quot;Microsoft Excel Technical Reference for the Macintosh&quot; manual on the Technical Reference Guide disk in the &quot;Macro Examples&quot; 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 &quot;Sieve&quot;.
 * 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 :

Technology :