Given the text below, how can I classify each character as kana or kanji?
誰か確認上記これらのフ
To get some thing like this
誰 - kanji
か - kana
確 - kanji
認
I know you didn't ask for VBA, but here is the VBA flavor for those who want to know:
Here's a function that will do it. It will break down the sentence like you have above into a single cell. You might need to add some error checking for how you want to deal with line breaks or English characters, etc. but this should be a good start.
Function KanjiKanaBreakdown(ByVal text As String) As String
Application.ScreenUpdating = False
Dim kanjiCode As Long
Dim result As String
Dim i As Long
For i = 1 To Len(text)
If Asc(Mid$(text, i, 1)) > -30562 And Asc(Mid$(text, i, 1)) < -950 Then
result = (result & (Mid$(text, i, 1)) & (" - kanji") & vbLf)
Else
result = (result & (Mid$(text, i, 1)) & (" - kana") & vbLf)
End If
Next
KanjiKanaBreakdown = result
Application.ScreenUpdating = True
End Function