首页 > 解决方案 > VBA EXCEL VLOOKUP .SpecialCells(xlCellTypeVisible) 参数

问题描述

我将自动过滤器应用于 excel 文件中的列。在我想使用 vlookup 应用程序并将其仅用于可见单元格之后。我尝试使用 .SpecialCells(xlCellTypeVisible) 参数,但无法在我的代码中实现它。

With twb.Sheets("main")
       For rw = 6 To .Cells(Rows.Count, 1).End(xlUp)
      .Cells(rw, 14) = Application.VLOOKUP(.Cells(rw, 2).Value2, x, 25, False)
     Next rw
 End With
'ActiveSheet.ShowAllData
Application.DisplayAlerts = False
  Application.ScreenUpdating = True

标签: excelvbavlookupvisible

解决方案


推荐阅读