用#REF删除每一行使用VBA
我想删除列A中包含#REF
每一行
我的代码只能处理value
,不能用#REF
。
Dim varFindThis As Variant Dim rngLookIn As Range Dim f As String varFindThis = Worksheets("Suivi2").Range("B1") Set rngLookIn = Worksheets("Suivi2").Range("A:A") If Not rngLookIn.Find(varFindThis, LookIn:=xlValues) Is Nothing Then f = Worksheets("Suivi2").Range("B1").Value 'Since i didn't got that clear, here above you must create a code to declare "f" as whatever you want Set c = Worksheets("Suivi2").Range("A:A").Find(f) Worksheets("Suivi2").Range(c.Address).EntireRow.Delete End If
您可以使用Range.SpecialCells方法快速查找Worksheet.UsedRange属性中的所有错误。
on error resume next with Worksheets("Suivi2").Columns(1) if not .specialcells(xlCellTypeFormulas, xlErrors) is nothing then _ .specialcells(xlCellTypeFormulas, xlErrors).EntireRow.Delete end with on error goto 0
- Excel Solver GRG非线性优化中的GRG代表什么?
- VBA通过IBM Notes发送电子邮件不工作?
- 使用经纬度Excel表创build点Shapefile
- 如何使用Mule 3.4 ESB中的Datamapper在数据库中映射Excel文件
- ThisWorkbook.ChangeFileAccess xlReadWrite在VBA窗口中为工作簿创build多个VBAProject
- 是否可以获取CSV文件中的行数而不打开它?
- 使用F#和GemBox.Spreadsheet“堆叠”单元格样式
- 使用macros在excel文件的所有表格中searchstring
- 如何将多个页面的gridview数据导出到excel文档中?