Created
November 21, 2012 22:31
-
-
Save pokutuna/4128291 to your computer and use it in GitHub Desktop.
ultra useful excel macro
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 となりセルをコメントにし太郎() | |
Dim pos As Range | |
Dim relatedCell As Range | |
Set pos = Range(ActiveCell.Address) | |
Set relatedCell = pos.Offset(0, 1) | |
If Not relatedCell.Text = "" Then | |
On Error GoTo SET_COMMENT_ERROR | |
pos.AddComment | |
pos.Comment.Visible = False | |
pos.Comment.Text Text:=relatedCell.Text | |
End If | |
SET_COMMENT_ERROR: | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment