excel一列粘贴进合并单元格

299 2024-02-13 04:10

vb Sub PasteIntoMergedCells() Dim srcRange As Range Dim cell As Range ' 获取要粘贴的数据 Set srcRange = Worksheets("Sheet1").Range("A1:A10") ' 遍历合并的目标单元格,并将数据粘贴进去 For Each cell In srcRange If cell.MergeCells Then cell.MergeArea.Value = cell.Value End If Next cell End Sub
顶一下
(0)
0%
踩一下
(0)
0%
相关评论
我要评论
点击我更换图片