View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
 
Posts: n/a
Default how do I find prime factors of a number

On 28 Nov 2005 19:17:55 -0800, "DOR" wrote:

Try this, assuming number is in A1:

=LARGE((ROUND($A$1/ROW(INDIRECT("$1:$"&$A$1)),0)=$A$1/ROW(INDIRECT("$1:$"&$A$1)))*ROW(INDIRECT("$1:$"&$A $1)),ROW(1:1))

Enter as an array formula - Ctl+Shift+Enter and drag/copy down as far
as necessary to show all factors. Works for positive numbers only.
Would need to put ABS($A$1) for all instances of $A$1 if there was a
danger the number could be negative.

Declan O'R


Your formula appears to produce *all* the factors for a given integer. I
believe the OP only wanted the *prime* factors.




--ron