Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Excel で全角-半角変換
Sub Zen2han()
Dim num As Integer
Dim cells As Range
Set cells = ActiveSheet.cells.SpecialCells(xlCellTypeConstants, xlTextValues)
For num = 0 To 9
cells.Replace What:=Right(StrConv(Str(num), vbWide), 1), Replacement:=Right(Str(num), 1)
cells.Replace What:="-", Replacement:="-"
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.