+ Reply to Thread
Results 1 to 14 of 14

Phonetic Help

  1. #1
    Registered User
    Join Date
    09-03-2008
    Location
    Kahului, HI
    MS-Off Ver
    365 v.2409
    Posts
    47

    Phonetic Help

    Greetings all.

    I'm trying to attempt a spreadsheet where any word or words entered into a particular cell will result in its phonetic counterpart appearing in a cell below.

    So if I type John Smith in cell A1, then cell A2 would return Juliet, Oscar, Hotel, November Seirra, Mike...etc. Ideally, I'd also like a seperator between words in the phonetic cell such as two dashes.

    A search on this forum came up dry. On Google, I only got one weak possibility. Someone had created a spreadsheet to do almost the same thing, but it's required to be six characters long and will not return spelling for numbers. Here's the link to this person's question on another website, as well as a link to the spreadsheet he has with the limited phonetic functionality.
    Sample Worksheet

    Any help would be GREATLY appreciated. Thanks all!

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    Hi Ryusui,

    I put together this code which might do the trick. It relies on a table of values/phonetics on Sheet1, cells A1:B36 (A-Z, 0-9). Obviously this location could change, or you could use other methods to check each letter against some list.

    Select the cell you want to convert to phonetics, then click the command button and it will populate the cell below with the phonetics separated by two dashes each. The code also eliminates any space characters using Substitute, but this could also be modified.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-03-2008
    Location
    Kahului, HI
    MS-Off Ver
    365 v.2409
    Posts
    47
    Wow, pjoaquin! Thank you so very much! This is exactly what I needed. And an especially large thanks for working this so quickly!

    -----------------------------------------------------------------------
    Actually, now that I'm looking at it, is there a way to modify that so when certain cells have text put into them, the phonetic automatically appears beneath it? I'm going to have several cells with data that need converting and to select each cell and hit the button for every one will get a little tedious.
    Last edited by Ryusui; 09-03-2008 at 11:18 PM.

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    Hi again,

    Right-click on the worksheet tab on which you'll be entering the values, select 'View Code'. In that code window paste the following code:
    Please Login or Register  to view this content.
    Any word(s) you enter in Column A (any cell) will trigger the macro. The phonetic version will appear in the cell below the one you just changed. I also added some error trapping in case non-alphanumeric characters are encountered (e.g. symbols, punctuation, etc.). Hopefully this works for you.

  5. #5
    Registered User
    Join Date
    09-03-2008
    Location
    Kahului, HI
    MS-Off Ver
    365 v.2409
    Posts
    47
    Thanks again!
    So far so good. It's giving me a small issue though...if I delete any text that I've input, it gives me an error.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    just out of interest when did the phonetic alphabet change to p=pencil?
    having worked in telecomms for over 30 years and use it on a regular basis
    the accepted international format is

    A - Alpha // K - Kilo // U - Uniform // 0 - Zero
    B - Bravo // L - Lima // V - Victor // 1 - Wun (One)
    C - Charlie // M - Mike // W - Whiskey // 2 - Two
    D - Delta // N - November // X - X-ray // 3 - Tree (Three)
    E - Echo // O - Oscar// Y - Yankee // 4 - Fower (Four)
    F - Foxtrot // P - Papa // Z - Zulu // 5 - Fife (Five)
    G - Golf // Q - Quebec // 6 - Six
    H - Hotel // R - Romeo // . - decimal (point) // 7 - Seven
    I - India // S - Sierra // . - (full) stop // 8 - Ait (Eight)
    J - Juliet // T - Tango // 9 - Niner (Nine)
    p for pencil is like a schoolkids thing
    a=apple b=bear
    c=christmas and so on
    Last edited by martindwilson; 09-04-2008 at 08:05 PM.

  7. #7
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    Martin, I made all those up. I just needed something in those fields to test the code.

  8. #8
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    Ryusui, to fix that problem, add the one line of code in red shown below. My guess is that you get an error when trying to delete multiple cells at the same time, but not when you delete just one cell at a time (at least this was the case for me).
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    09-03-2008
    Location
    Kahului, HI
    MS-Off Ver
    365 v.2409
    Posts
    47
    Sorry, I figured out what went wrong.
    The second code you posted works fine. But I tried to (in my limited knowledge) change it so that instead of text entered into column A changing, it'd be the text in pre-defined cells. Specifically B4,I4,B9,I9,B17,I17,B22,B33,I33,B38,I38,B43,I43. So I replaced the A:A with that, and it worked ok when I typed, but when I deleted I'd get the error.

  10. #10
    Registered User
    Join Date
    09-03-2008
    Location
    Kahului, HI
    MS-Off Ver
    365 v.2409
    Posts
    47
    Just wanted to bring it up once to see if I can get this further solved. Thanks!

  11. #11
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    Ryusui,

    In my last code offering, I simply replaced A:A with B4,I4,B9,I9,B17,I17,B22,B33,I33,B38,I38,B43,I43 and I can delete any amount of cells without error.

    Remember to leave the quotation marks around those cells, e.g. Range("B4,I4,B9,I9....").

  12. #12
    Registered User
    Join Date
    09-03-2008
    Location
    Kahului, HI
    MS-Off Ver
    365 v.2409
    Posts
    47
    Huh...odd. I did that precisely and still got errors. Will attempt again.
    Thanks!

  13. #13
    Registered User
    Join Date
    09-03-2008
    Location
    Kahului, HI
    MS-Off Ver
    365 v.2409
    Posts
    47
    For whatever reason, I couldn't get it to work in my initial sheet, so I had to create a new one and insert the code and then it works fine.

    New problem though. Numbers don't seem to want to translate... =(

  14. #14
    Registered User
    Join Date
    09-03-2008
    Location
    Kahului, HI
    MS-Off Ver
    365 v.2409
    Posts
    47
    Quick bump for aid.

+ 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