2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

VBAで送り仮名自動生成

2
Posted at

VBAで送り仮名自動生成

  • 漢字やひらがなの名称列データに対して、送り仮名を生成する
VBA
Sub Macro1()

    Dim i As Long

    ' 処理対象のファイル(事前に開いといてね)    
    Workbooks("サンプル.xlsx").Activate
    
    ' 行のループ範囲を指定
    For i = 3 To 340
        ' 右辺のデータを左辺に代入
        ' 左辺=カナデータを格納するセル
        ' 右辺=元データからカナデータを生成
        Range("H" & i).Value = StrConv(Application.GetPhonetic(Range("B" & i)), vbNarrow)


    
    Next

End Sub
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?