excel怎么把许多单元格的内容快速复制到一个批注里面?

excel

1个回答

写回答

Fei821100

2025-09-30 10:30

+ 关注

VBA
VBA

使用VBA可以在excel中插入批注,实现对表格中的单元格内容进行快速复制。下面是一个示例代码:vbSub 插入批注()Dim i As Integer, s As Stringi = 2Do While Cells(i, 1) ""s = "业务员:" & Cells(i, 3) & "产品名称:" & Cells(i, 4) & "单价:" & Cells(i, 7)comment = Comments(Cells(i, 1))comment.Text = si = i + 1LoopEnd Sub执行以上代码后,在表格中指定的单元格上方将自动生成相应批注内容。

举报有用(4分享收藏

Copyright © 2025 IZhiDa.com All Rights Reserved.

知答 版权所有 粤ICP备2023042255号