+ Reply to Thread
Results 1 to 13 of 13

Password Table - Automatically Convert Text using a Table?

  1. #1
    Registered User
    Join Date
    03-30-2016
    Location
    England
    MS-Off Ver
    2013
    Posts
    4

    Password Table - Automatically Convert Text using a Table?

    Hi,
    I've created my own password table that allows me to, at the moment, manually take a memorable password and convert it into a string of letters, numbers and symbols.
    I would like to be able to input my memorable password and for it to spit out my converted password. The table looks something like this:
    a b c A B C 1 2 3
    1 c 2 C B A 3 b a
    Is there anyway I could get Excel to take a list of letters and numbers and use the above table to convert them?
    e.g. if my password was A1b2C3, can I get excel to automatically convert it to --> C3cbAa ?
    Thank you very much for your help,
    Regards,
    iaminneedofhelp

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Password Table - Automatically Convert Text using a Table?

    I assume your table isnt just that but contains all of the chars A-Z a-z and 0-9?

    If so then personally Id extend it to include all of the ASCII characters between 0 (Ascii 48) and z (Ascii 122) giving you a total of 75 columns.

    Then have a UDF that cycles through the password char by char, looking up the relevant character from the table by deducting 47 from the ASCII value to give the column number

    Please Login or Register  to view this content.
    The attached example refers.
    Attached Files Attached Files
    If someone has helped you then please add to their Reputation

  3. #3
    Forum Contributor
    Join Date
    04-20-2015
    Location
    Switzerland
    MS-Off Ver
    2010
    Posts
    312

    Re: Password Table - Automatically Convert Text using a Table?

    Hi iaminneedofhelp,

    Here is an Example how to change a given Password to something new.
    In this case we take the ASCII Value and add a specific Number to it to get a new password.

    If you want the characters to change to a specific Value like in your Table you could make Arrays that are aligned with the Asci Numbers and fill them with the replacement chars

    Please Login or Register  to view this content.
    Greets Loki

  4. #4
    Registered User
    Join Date
    03-30-2016
    Location
    England
    MS-Off Ver
    2013
    Posts
    4

    Re: Password Table - Automatically Convert Text using a Table?

    Thanks for the reply,
    I'm trying to set it up now and have taken your advice on including all the ASCII characters from 48 to 122.
    My aim is to set up a list that contains the ASCII chars from 48 to 122, and below it a randomised version of these ASCII chars that is specific to this document. My question is whether it's possible to do this and then create the UDF as you mentioned above.

    I've attached what the document looks like currently.

    I am not very good with Excel and I'm ashamed to say I've never used a UDF before so any help on that front would be greatly appreciated (I do know the basics of using and setting up a UDF though) .

    Thanks,
    iaminneedofhelp
    Attached Files Attached Files
    Last edited by iaminneedofhelp101; 03-30-2016 at 01:17 PM.

  5. #5
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Password Table - Automatically Convert Text using a Table?

    Add the following Sub to your workbook and run it to randomise row 3 of your data.

    Please Login or Register  to view this content.
    As for using a UDF, once youve added it to your workbook then you just use it like any other function so in this case you would put
    Please Login or Register  to view this content.
    to convert whatever was in cell A10 or
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    04-20-2015
    Location
    Switzerland
    MS-Off Ver
    2010
    Posts
    312

    Re: Password Table - Automatically Convert Text using a Table?

    problem if you randomize it this way is that you will not be able to reconstruct the Original Password cause you will end up with one Character having the same Value like another.

    you could end up with a table for Hello that looks like this which makes it impossible to get the Original Password

    H e l l o
    Z u Z Z k

  7. #7
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Password Table - Automatically Convert Text using a Table?

    You shouldnt get duplicate values with that randomisation as it swaps values around ie it cycles through the 75 chars swapping them with another char eg
    char1 swaps with char50
    char2 swaps with char7
    char3 with 70
    char4 with char 2

    so you should (unless Ive mucked up the coding) end up with the same 75 chars in different order.

  8. #8
    Forum Contributor
    Join Date
    04-20-2015
    Location
    Switzerland
    MS-Off Ver
    2010
    Posts
    312

    Re: Password Table - Automatically Convert Text using a Table?

    You defenetly get double values i testet your code with the given Example Sheet and i ended up with double values.
    Even if you swap out numbers you do swap characters based on a rand number

    Check my comments
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    03-30-2016
    Location
    England
    MS-Off Ver
    2013
    Posts
    4

    Re: Password Table - Automatically Convert Text using a Table?

    Yes, LordLoki is correct.
    What should I change the code to to fix this issue?
    Thank you both very much for your help!

  10. #10
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Password Table - Automatically Convert Text using a Table?

    Is needing to recover the password from the output an absolute requirement? If not, why not just hash it?

  11. #11
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Password Table - Automatically Convert Text using a Table?

    Quote Originally Posted by LordLoki View Post
    You defenetly get double values i testet your code with the given Example Sheet and i ended up with double values.
    Even if you swap out numbers you do swap characters based on a rand number

    Please Login or Register  to view this content.
    Well spotted however it requires a single char change to fix as per the notes above.

    I was getting duplicates in the test I then did and changed another line from looking at row 2 to 3 but missed the one above however when I tested it I didnt see any duplicates at a glance and assumed it was fixed (Poor testing tbh)

    Please Login or Register  to view this content.
    change the 2 in the above to a 3

  12. #12
    Forum Contributor
    Join Date
    04-20-2015
    Location
    Switzerland
    MS-Off Ver
    2010
    Posts
    312

    Re: Password Table - Automatically Convert Text using a Table?

    Here is a solution that prevents the double assignment of Values
    We Put all the Chars in a Collection then generate a number based on the items inside the Collection
    assign the Char from the Collection to the table and delete it.

    In this Scenario it could happen that for Example A still is A but that should not matter cause the chance that all letters stay the same is astronomically small :D

    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    03-30-2016
    Location
    England
    MS-Off Ver
    2013
    Posts
    4

    Re: Password Table - Automatically Convert Text using a Table?

    I've run the sub twice and both times I could not find any repeat values (maybe there are but I haven't noticed them yet).
    Thank you both PJWhitfield and Lord Loki for helping me. I have combined both of your answers into one solution - much appreciated.
    I have attached the final document for anybody interested to read.

    P.S. Kyle, I don't know how to do my own cryptographic hashing yet!
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 11-29-2015, 07:20 AM
  2. Automatically convert information from table
    By hamstermann in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-27-2015, 12:26 PM
  3. Convert a mutli colum Multi roy table to a 3 column table
    By stratis63 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2015, 11:30 AM
  4. Need to convert pivot table numbers to text
    By dchu in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-03-2014, 02:51 AM
  5. VBA code to convert value in pivot table to text
    By cgabe001 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-08-2014, 12:11 PM
  6. [SOLVED] Convert table with multiple header columns into a pivotable table
    By jasonleewkd in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2013, 03:20 AM
  7. Excel 2007 : Automatically group rows in text only table
    By spjmorris in forum Excel General
    Replies: 8
    Last Post: 12-24-2011, 01:47 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1