Created
September 5, 2018 08:43
-
-
Save sharapeco/5d8efc8c66ab998ef4ce38b350cc40ae to your computer and use it in GitHub Desktop.
Excel で全角-半角変換
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
Next | |
cells.Replace What:="-", Replacement:="-" | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment