excel 怎么批量插入批注,如下图,怎么批量把B列的数据快速的以批注的形式添加到A列的数据中 如何在excel里的批注里批量添加图片
excel\u6279\u91cf\u6dfb\u52a0\u6279\u6ce8\u3002\u54ea\u4f4d\u5927\u795e\u7ed9\u4e2a\u628aB\u5217\u6dfb\u52a0\u4e3aA\u5217\u6279\u6ce8\u7684VBA\u4ee3\u7801Sub \u52a0\u6279\u6ce8()Dim r As LongDim i As LongOn Error Resume Next r = [b65535].End(xlUp).Row For i = 1 To r Cells(i, 1).AddComment Cells(i, 1).Comment.Text Cells(i, 2).Value Next End Sub
Sub a()
For i% = 1 To [a65536].End(3).Row
If Range("B" & i) <> "" Then
Range("A" & i).AddComment CStr(Range("B" & i).Value)
Range("A" & i).Comment.Visible = False
End If
Next i
End Sub
右键工作表标签,可看代码。粘贴上面的代码。运行代码即可。
'批量把B列的数据快速的以批注的形式添加到A列的数据中
Sub test()
dim str as string
For i = 1 To 65536
str=range("B" & i)
if str="" then exit sub
Call addpz(str, "A" & i)
Next
End Sub
Public Function addpz(str1 As String, addr As String)
On Error Resume Next
Range(addr).AddComment
Range(addr).Comment.Visible = False
Range(addr).Comment.Text Text:=str1
End Function
扩展阅读:excel 批量粘贴不同批注 ... 批量导入不同内容批注 ... 如何让批注字变大 ... excel批量增加批注 ... excel快速插批注快捷键 ... excel批注怎么批量修改 ... 如何批量添加批注 ... excel 批注位置乱跑 ... excel 文字加批注 ...