Skip to content

Instantly share code, notes, and snippets.

@unarist
Created May 30, 2013 13:58
Show Gist options
  • Save unarist/d469c9705956646bef98 to your computer and use it in GitHub Desktop.
Save unarist/d469c9705956646bef98 to your computer and use it in GitHub Desktop.
適当な文章(改行可)をセルに貼りつけて、このマクロを実行してみるといいんじゃないかな(棒
Sub ExcelHogan()
Dim base As Range
Dim text, c, x, y
Set base = ActiveCell
text = base.text
For i = 1 To Len(text)
c = Mid(text, i, 1)
If c = vbLf Then
x = 0
y = y + 1
Else
base.Offset(y, x).Value = c
x = x + 1
End If
Next i
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment