+ Reply to Thread
Results 1 to 9 of 9

Vigenere Cipher - Decryption is tricky

  1. #1
    Registered User
    Join Date
    01-21-2014
    Location
    London, England
    MS-Off Ver
    Microsoft Office Professional Plus 2010
    Posts
    11

    Vigenere Cipher - Decryption is tricky

    Hello,
    For my current project I must create a vigenere cipher in an excel spreadsheet. I have successfully encrypted my plain text, but I have had some trouble decrypting it.

    The vigenere cipher works like this:
    You have two text strings; a message(plain text), and a keyword.
    To encrypt each letter, you use the vigenere square.
    The first letter of the message is 'E' - therefore we go to the 'E' column (cell F1)
    The first letter of the keyword is 'M' - so we go to the 'M' row (cell A14).
    We then use the square to find where the column and row intersect - this is in cell F14 - so the first letter of our encrypted message is 'Q'.


    I have used the functions 'MATCH' and 'INDEX' to encrypt, but am having problems reversing them for the decryption.

    Please see the document attached.

    Many thanks.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    11-26-2013
    Location
    Norway
    MS-Off Ver
    Excel 2013
    Posts
    67

    Re: Vigenere Cipher - Decryption is tricky

    Hi

    Try this in AD28:

    =INDEX($A$1:$AA$1,MATCH(AD22,INDIRECT("A"&MATCH(AD25,$A$1:$A$27,0)&":AA"&MATCH(AD25,$A$1:$A$27,0)),0))
    Best regards

    Per Erik Midtr?d

  3. #3
    Registered User
    Join Date
    01-21-2014
    Location
    London, England
    MS-Off Ver
    Microsoft Office Professional Plus 2010
    Posts
    11

    Re: Vigenere Cipher - Decryption is tricky

    Brilliant, thank you very much :-)

  4. #4
    Registered User
    Join Date
    01-21-2014
    Location
    London, England
    MS-Off Ver
    Microsoft Office Professional Plus 2010
    Posts
    11

    Re: Vigenere Cipher - Decryption is tricky

    Hi, could you please help me fix the flaw in the formula - When the letter of the cipher text is equal the corresponding keyword letter, the decryption is '0'.

    Please see the attachment
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-26-2013
    Location
    Norway
    MS-Off Ver
    Excel 2013
    Posts
    67

    Re: Vigenere Cipher - Decryption is tricky

    Sorry, I think I did it backwards the first time, try this:
    INDEX($B$1:$AA$1;MATCH(AD22;INDIRECT("B" &MATCH(AD24;$A$2:$A$27;0)+1 &":AA" &MATCH(AD24;$A$2:$A$27;0)+1);0))

  6. #6
    Registered User
    Join Date
    01-21-2014
    Location
    London, England
    MS-Off Ver
    Microsoft Office Professional Plus 2010
    Posts
    11

    Re: Vigenere Cipher - Decryption is tricky

    Hi, sorry, this formula comes up with an error. Do you know where the error is?
    Last edited by menquin; 02-19-2014 at 01:59 PM.

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Vigenere Cipher - Decryption is tricky

    did you change the ; to , ?

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Registered User
    Join Date
    01-21-2014
    Location
    London, England
    MS-Off Ver
    Microsoft Office Professional Plus 2010
    Posts
    11

    Re: Vigenere Cipher - Decryption is tricky

    Thank you very much - I know have a fully functional vigenere cipher!

  9. #9
    Registered User
    Join Date
    03-18-2019
    Location
    US
    MS-Off Ver
    360
    Posts
    1

    Re: Vigenere Cipher - Decryption is tricky

    2019 and this is still useful

+ 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. Vigenere Cipher - Encryption is tricky
    By menquin in forum Excel General
    Replies: 9
    Last Post: 02-17-2014, 01:20 PM
  2. Want to understand how some VBA code works
    By ualvi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-10-2013, 10:04 AM
  3. Replies: 2
    Last Post: 11-04-2012, 06:35 PM
  4. Decryption of a basic encryption
    By BENGREEN1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-05-2012, 01:29 PM
  5. Excel 2007 : decryption support
    By Nathan1001 in forum Excel General
    Replies: 1
    Last Post: 01-11-2012, 03:42 AM

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