|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub 将单元格内容转到批注()
Dim ra1 As Range, ra2 As Range, ra3 As Range, ran As Range, a$
On Error Resume Next
Set ra1 = Sheet1.UsedRange
Set ra2 = Sheet2.UsedRange
Set ra3 = Sheet3.UsedRange
ra1.ClearContents
ra1.ClearComments
Sheet1.[a1].Resize(ra2.Rows.Count, ra2.Columns.Count) = ra2.Value
Application.ScreenUpdating = False
For Each ran In ra3
If ran.Value <> "" And ran.Row > 1 Then
a = ran.Formula
With ra1(ran.Row, ran.Column)
.AddComment
.Comment.Text "" & a & ""
.Comment.Visible = False
.Comment.Shape.Fill.Visible = msoFalse
End With
End If
Next
Set ran = Nothing: ra = Nothing
Application.ScreenUpdating = True
End Sub
|
评分
-
1
查看全部评分
-
|