+ Reply to Thread
Results 1 to 2 of 2

doing a ceasar cipher excel project (need help with vlookup!)

  1. #1
    Registered User
    Join Date
    09-17-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    doing a ceasar cipher excel project (need help with vlookup!)

    My project entails that
    Prompt the user to enter a translation factor (may be a positive or negative translation of up to 25 characters). Write a formula to verify that a valid translation factor has been entered. Use the IF function to check that it is between -25 and 25.

    Create a translation table to convert each letter of the alphabet to a numeric, then use a formula to apply the translation to each numeric value. Your table should have 3 columns. Suppose the translation factor is 3. Use a formula with the MOD function to create Col 3 of the table.

    Col 1 Col 2 Col 3
    (Numerics) (Alphabet) (Translated Numeric)
    0 A 3
    1 B 4
    2 C 5
    3 D 6
    . . .
    . . .
    Z 2


    Prompt the user to enter a plaintext message of up to 7 letters (one character per cell). Use a formula to encrypt the plaintext (your formula will need to use two VLOOKUP functions).

    To do the encryption,
    Find the plaintext letter in the middle column of the table
    Look up its translated numeric (use VLOOKUP) in Col 3
    Find the translated numeric in Col 1
    Look up its alphabetic in Col 2 (use VLOOKUP)

    Decrypt the ciphertext generated in Step 3 to get back the plaintext. Insert additional columns into the translation table, as needed.
    this is my first time doing an excel project, so alittle lost.
    looks like i got the translation correct with
    =IF(AND(B7>=-25,B7<=25),"OK","ERROR")

    for the translation i used =MOD(A17+$B$7,26)

    as for the caesar cipher translation. i think my formula is alittle off..
    14-2.png and i need to use a formula to translate I T W A S to the cipher.. and then back to original letters (see document attached)
    im using =VLOOKUP(C10,$A$10:$B$35,2) for the cipher. (not sure if this is right?) and then =VLOOKUP(H15,$B$10:$D$35,3) to go back to the original.. which works with I.. but none of the others. when i edit something in the formula it turns to N.A (help!)
    Attached Files Attached Files

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: doing a ceasar cipher excel project (need help with vlookup!)

    Prompt the user to enter a translation factor (may be a positive or negative translation of up to 25 characters). Write a formula to verify that a valid translation factor has been entered. Use the IF function to check that it is between -25 and 25.
    Do this by using in Cell B7 and do away with Cell C7
    Data -- Data Validation -- Whole number -- between -- Minimum (-25) -- Maximum (25)

    Prompt the user to enter a plaintext message of up to 7 letters (one character per cell).
    Again, use data validation for each of the cells -- list -- Source (B10:B35)

    Create a translation table to convert each letter of the alphabet to a numeric, then use a formula to apply the translation to each numeric value. Your table should have 3 columns. Suppose the translation factor is 3. Use a formula with the MOD function to create Col 3 of the table.
    Correct formula in C10 to
    Please Login or Register  to view this content.
    and copy down

    To do the encryption,
    Find the plaintext letter in the middle column of the table
    Look up its translated numeric (use VLOOKUP) in Col 3
    Find the translated numeric in Col 1
    Look up its alphabetic in Col 2 (use VLOOKUP)
    Use in Cell H18
    Please Login or Register  to view this content.
    and drag across. This will give you the ciphertext.

    Decrypt the ciphertext generated in Step 3 to get back the plaintext. Insert additional columns into the translation table, as needed.
    In Column E use
    Please Login or Register  to view this content.
    and copy down
    For conversion back to plain text use
    Please Login or Register  to view this content.
    and copy across.

    See attached.
    Attached Files Attached Files
    Life's a spreadsheet, Excel!
    Say thanks, Click *

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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