Cenerate password from cell information

n2brand

New Member
Joined
May 26, 2002
Messages
41
I have a spreadsheet with my customers , name ,address, phone number, height , weight , etc.
I would like to generate a unique random password for each customer using 3 or more of their cells information.

Thank you in advance
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
To get you started, you can use formulas to create what the password will be.
If A1 = NAME
A2 = ADDRESS
A3 = PHONE

the formula =LEFT(A1,2)&MID(A2,2,3)&RIGHT(A3,3) would produce the value NADDRONE
left(A1,2) = NA - Left 2 characters
MID(A2,2,3) = DDR - Middle 3 characters starting at the 2nd character
RIGHT(A3,3) = ONE - Right 3 characters

You can adjust that as required for whatever targets you wish.

Was that the end of your issue? or did you want to apply that password?
Assuming the latter... where... password to open sheet? Password to unlock sheet?
Please confirm
 
Upvote 0
That works well. Is there a way to make some of it a mixture of letters, number and characters ?

Makes for a little more secure.

Yes also to open separate sheet.

Thank for your quick response
 
Upvote 0
You are creating a text string so yes to the mixture of letters and numbers
If the right one for instance was pointed at a phone number and the last three digits were 123 the answer would have been NADDR123

You can also add case sensitivity
Teweaking my original example

If A1 = NAME
A2 = ADDRESS
A3 = 4165551212

the formula =LEFT(A1,2)&LOWER(MID(A2,2,3))&RIGHT(A3,3) would produce the value NAddr212
LEFT(A1,2) = NA - Left 2 characters
MID(A2,2,3) = ddr - Middle 3 characters starting at the 2nd character all converfted to LOWER case
RIGHT(A3,3) = 212- Right 3 characters

PUT LOWER( ) around your formula segment to make it lower case. UPPER makes it upper case and PROPER capatalizes the first Character of the string
 
Upvote 0
VBA Code:
Sheets("Sheet1").Protect Password:="myPassword"

Change "Sheet1" to relevant sheet name

assuming the password you want to apply is on sheet "MWAHAHA" in cell B2
and replace "myPassword" with Sheets("MWAHAHA").Range("B2).value
VBA Code:
Sheets("Sheet1").Protect Password:=Sheets("MWAHAHA").Range("B2).value

That should do it
 
Upvote 0
That's awesome. I will work with this and if I have issues I will ask more questions..

I really appreciate your time ,
 
Upvote 0
How would I structure the formula if I wanted to use 4,5,or 6 columns to generate the password ?
 
Upvote 0
Look at my original formula. the & (ampersand) symbol is like the nub on a lego block... it connects cells together.
So=A1&A2&A3&B4&F5&C2.... as many pieces as you wish
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,259
Members
449,075
Latest member
staticfluids

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