excel - 使用 VBA 的 Excel 单元格中的公式
问题描述
尝试使用 VBA excel 在单元格中添加 vlookup 公式,但出现运行时错误 1004。
我的代码:-
Range(Cells(2, AgtColV.Column), Cells(LastRowMerge, AgtColV.Column)).Formula = _
"=IF(ISNA(VLOOKUP(RC[-1],'\\stor.site.com\s2\me\My Documents\[om_vlookup.xlsb]Agent_M'!$D:$E,2,0)),""NF"",VLOOKUP(RC[-1],'\\stor.site.com\s2\me\My Documents\[om_vlookup.xlsb]Agent_M'!$D:$E,2,0)
我认为问题是因为我在 $D:$E 中使用了 $
解决方案
推荐阅读
- android - 导航到其他页面并返回后,Flutter Isolate 不会执行 setState
- ubuntu - 如何在 Ubuntu 中停止 hybris 服务器?
- python - 如何抓取多个标签下的段落数据
- react-native - 如何在 react-native 自动完成下拉输入值中添加连字符
- typescript - 使用 Chart.js 仅在第二个 y 轴上缩放
- python - 合并最接近的值 Pandas
- apache-spark - EKS Apache spark 上的 Spark-operator 无法创建临时目录
- mysql - Mysql 表大小为 270 Gb,但 lib 文件夹显示 810 GB 谁能指导我需要删除哪些文件
- c++ - 带类的 C++ 数组函数指针
- sql - Oracle_SQL 中“不喜欢”的异常