excel - 当匹配之一是日期( VBA )时具有多个匹配(循环)的索引 - 值不匹配
问题描述
嗨,我正在尝试首先通过列进行索引匹配循环,然后在 VBA 中使用多个条件进行行
我的源数据如下:
日期 email-ID 考勤状态
和目的地数据,如:
电子邮件 ID 日期 1 日期 2 日期 3
我在哪里使用带有工作表功能的代码
.With Destination
.Range("B2:D4").Clear
For R = 2 To 4
For C = 2 To UBound(Arr2, 2)
.Cells(R, C) =
.Application.WorksheetFunction.Index(Source. Range("A2:C30000"),.Application.WorksheetFunction.Match(.Cells R, 1) & CDate(.Cells(1, C)), WS1.Range("B2:B30000") & WS1.Range("A2:A30000"), 0), 3)
Next C
Next R
.Activate
End With
End Sub
它给了我类型不匹配错误。有什么帮助吗?
我在 Mac 上使用 Excel 2016。
解决方案
推荐阅读
- selenium - 在 Xunit Selenium C# 中使用 cookie 时得到 System.NullReferenceException:对象引用未设置为对象的实例错误
- c++ - 带有 aecho 的 FFmpeg 过滤器配置无法配置所有链接和格式 - avfilter_graph_config
- javascript - SetTimeout 在 chrome 代码片段中不起作用
- javascript - promises.push() 立即运行,不等待 promises.all()
- windows - 如何从 Windows 完全卸载 Flutter SDK
- node.js - 如何使我的 Firestore 监听器安全/安全?
- jenkins - 如何从 Jenkinsfile 检查其他目录中存在的文件,而不是工作区中的文件
- python - Python 单元测试用例错误:恰好需要 2 个参数(给定 3 个)
- c++ - 使用 If 语句/条件将数据输出到一个文件或另一个文件 C++
- sql-server - 将 UTC 时间转换为多个时区