自学内容网 自学内容网

Excel:vba实现筛选出有批注的单元格


实现的效果:

代码:

Sub test()
Dim cell As Range

Range("F3:I10000").Clear

lastRow = Cells(Rows.Count, "f").End(xlUp).Row
'MsgBox lastrow
For Each cell In Range("a1:a21")
    If Not cell.Comment Is Nothing Then
        'MsgBox cell.Value
        lastRow = lastRow + 1
        cell.Resize(1, 4).Copy Destination:=Cells(lastRow, "f")
    End If
Next cell

End Sub

 


原文地址:https://blog.csdn.net/m0_68120716/article/details/142995134

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!