Posted to microsoft.public.excel.misc
|
|
Formula to find all possible 4 digit combinations using the nu
Maybe I'm missing something -- given that we can have any 4 digits from the
set of 10 (0-9), aren't there 10,000 numbers that can be created? 0000
through 9999 ?? Assuming each digit can be used more than once?
"Gord Dibben" wrote:
Mike
Using the PERMUT fuction with 10 objects and 4 items I get 5040 possible..
Using COMBIN function I get 210 possibles.
Or am I missing something?
Gord Dibben MS Excel MVP
On Tue, 22 Sep 2009 16:20:01 -0700, Mike H
wrote:
Danelle,
I've been trying to get my head around how may combinations this is but it
is so many Excel can't calculate it or at least i can't come up with a
formula. having said that here's the formula you posted modified for all
combinations of 0 - 9
=MOD(INT((ROW(A2)-1)/9765625),5)&MOD(INT((ROW(A2)-1)/1953125),5)&MOD(INT((ROW(A2)-1)/390625),5)&MOD(INT((ROW(A2)-1)/78125),5)&MOD(INT((ROW(A2)-1)/15625),5)&MOD(INT((ROW(A2)-1)/3125),5)&MOD(INT((ROW(A2)-1)/625),5)&MOD(INT((ROW(A2)-1)/125),5)&MOD(INT((ROW(A2)-1)/25),5)&MOD(INT((ROW(A2)-1)/5),5)&MOD(ROW(A2)-1,5)
BTW I ran out of rows in Excel 2007 and was nowhere near the end
Mike
"Danelle Sanchez" wrote:
Hi,
I need to create a formula that will show the results of all possible 4 digit combinations using the numbers 0,1,2,3,4,5,6,7,8,9. I found a similar question on this forum but it was only for the numbers 0,1,3,4.
Here is the formula I found but did not know how to edit it for my required results
0, 1, 2, 3, 4
=MOD(INT((ROW(A2)-1)/125),5)&MOD(INT((ROW(A2)-1)/25),5)&MOD(INT((ROW(A2)-1)/5),5)&MOD(ROW(A2)-1,5)
EggHeadCafe - Software Developer Portal of Choice
WPF And The Model View View Model Pattern
http://www.eggheadcafe.com/tutorials...l-view-vi.aspx
|