vba - VBA 最后一行命令
问题描述
我正在 VBA 中创建一个 VLOOKUP,它工作正常,但我无法仅将 A 列中包含值的单元格定义为“范围”。下面的行考虑了所有列 A 及其给我列中所有空单元格的错误消息。知道如何修复语法吗?
Set lookFor = book1.Sheets(1).Range("A3" & LastRow)
解决方案
使用 SpecialCells 定位文本和数字常量。
Set lookFor = book1.Sheets(1).Range("A1:A" & LastRow).SpecialCells(xlCellTypeConstants, xlNumbers+xlTextValues)
推荐阅读
- shopping-cart - 使用了 Laravel bumbummen99/shoppingcart 包,它在 Firefox 浏览器中不起作用
- javascript - 文件阅读器不保持秩序
- css - 如何调整嵌套 UL 列表项的行距
- r - 通过在 R 中使用 summarise() 创建用户定义的函数来准备数据
- javascript - 如何比较两个div?
- sql-server - 如何列出视图的源表名称和列以及扩展属性(描述)
- spotify - Spotify API:我/播放器/最近播放 - 不显示最近收听?
- java - 按大小排列的 Akka
- swift - 拉动刷新不适用于表格视图
- flutter - Flutter Web 后退按钮