Your name in "Japanese"

Leandroarb

Board Regular
Joined
Oct 7, 2014
Messages
157
Hello everyone, These days I got a picture with letters and their syllables to form so your name in "Japanese". From there I rode this simple function to automate this using arrays and For-Next loops. Maybe you can think "useless", but I believe that idleness is very productive and in those moments you create several good things.Copy and paste the code below into a new module, type your name in a cell type and function in the cell sheet informing you wrote your name.Function NomeJapa(rng As Range) As StringDim strLetras As VariantDim strSilabas As VariantDim strNome As StringDim x As ByteDim y As ByteDim intCont As IntegerDim strNomeJapones As StringstrNome = LCase(rng)intCont = 0strLetras = Array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z")strSilabas = Array("ka", "tu", "mi", "te", "ku", "lu", "ji", "ri", "ki", "zu", "me", "ta", "rin", "to", "mo", "no", "ke", "shi", "ari", "chi", "do", "ru", "mei", "na", "fu", "ra")For x = 0 To Len(strNome)intCont = intCont + 1 For y = 0 To UBound(strLetras) If strLetras(y) = Mid(strNome, intCont, 1) Then strNomeJapones = strNomeJapones & strSilabas(y) & " " End If Next yNext xNomeJapa = strNomeJaponesEnd Function
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
No worries Leandroarb ;) I just looked at the CODE part.
Thanks anyway.
 
Upvote 0
I think either would be excellent submittals. Maybe there should be a separate forum for posts intended as paeans to one's cleverness versus assisting OPs.

I know you understood, but lest the humor of it all is lost on some of the readers of this thread....

under no circumstance should anyone consider using either of the one-liner functions I posted...

they were constructed for the "fun of it", mainly in reaction to the link shg posted in Message #7, basically (no pun intended) to see if I could do it (I enjoy making self-challenges to myself like this).

It's nice to see some people having a little fun. Thanks! You guys made this educational and entertaining. :)
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,361
Members
449,080
Latest member
Armadillos

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