Microsoft Excel

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Re: Microsodt Excel

Can anyone help me out on this one. I would like to have a formula for Subsets.
Can we help? Maybe... it depends on what you mean by "subsets". We could try guessing at what your current setup is and what you ultimately want to do with it, but I'm thinking things would move more quickly if you told us.
 
Upvote 0
Re: Microsodt Excel

Hi Nick, welcome to the board.

On the basis that the quality of the assistance is directly proportional to the quantity of the information provided, may I suggest you take a look at these guidelines.

If you can tell us what you're trying to achieve, preferably with some concrete examples, we'll find it much easier to respond usefully.
 
Upvote 0
I am looking for a formula that can give me all the possible 6 letter passwords from A to Z using Excel. Its bit time consuming with you have others important tasks to attend to and would also help a great deal not having duplicate passwords for my clients.
 
Upvote 0
I am looking for a formula that can give me all the possible 6 letter passwords from A to Z using Excel. Its bit time consuming with you have others important tasks to attend to and would also help a great deal not having duplicate passwords for my clients.
I have some code which will do exactly this. Where would you like the combinations output to: the worksheet or a text file?
 
Upvote 0
I'm thinking it may be more efficient for you to simple store the assigned passwords in an encrypted file, load them when you are ready to generate a new password and do a lookup to make sure that newly generated password has not been already assigned. I'm not a statistic person, but if I have done my calculations correctly, the complete list you are asking for would contain over 165 million possible passwords in it (165,765,600 to be exact)... that seems like it might be unwieldy to generate and work with.
 
Upvote 0
I make it 26^6 or 308,915,776.

My laptop is telling me it'll take about five and a half hours to generate them to a worksheet.
 
Last edited:
Upvote 0
Upvote 0
Rather than list 308M 6-letter passwords from AAAAAA to ZZZZZZ (what a boring parade!), how about a function?

Code:
Function Nick(ByVal d As Double, _
              Optional iLen As Long = 0) As String
    Dim avs As Variant
 
    avs = Split("A B C D E F G H I J K L M N O P Q R S T U V W X Y Z", " ")
 
    Do
        Nick = avs(d - Int(d / 26) * 26) & Nick
        d = Int(d / 26)
    Loop While d > 0#
 
    If Len(Nick) < iLen Then Nick = String(iLen - Len(Nick), avs(0)) & Nick
End Function

E.g.,

=Nick(0, 6) returns AAAAAA

=Nick(308915775, 6) returns ZZZZZZ

=Nick(1000000, 6) returns ACEXHO

It just converts the argument to base 26.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,848
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top