Excel中自动填加批注?
发布网友
发布时间:2022-04-26 15:04
我来回答
共1个回答
热心网友
时间:2023-10-10 22:39
给所自有满足条件的单元格添加批注
Sub 添加批注()
Dim I, J, X, Y As Long
Cells.ClearComments
X = ActiveCell.SpecialCells(xlLastCell).Row
Y = ActiveCell.SpecialCells(xlLastCell).Column
For I = 2 To X Step 2: For J = 1 To Y
Cells(I, J).Select
Selection.AddComment
Selection.Comment.Text Cells(I - 1, J) & vbCrLf & Cells(I, J)
Next J: Next I
End Sub