vba - 搜索功能无法找到公式结果
问题描述
我正在尝试执行搜索宏以在表格中查找特定日期。但是,表中的日期是通过从前一个日期加上 7 来设置的。因此,如果A1
是,1/1/2018
那么A2
将是A1+7
,导致1/8/2018
,等等。我已经添加LookIn:=xlValues
了搜索功能,但搜索仍然没有返回任何结果。非常感谢一些帮助。
这是我正在使用的代码:
target_date = Cells(2, 20).Value
Set finding = Cells.Find(What:=target_date, After:=Cells(1, 1), LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False)
If Not finding Is Nothing Then finding.Activate
解决方案
推荐阅读
- python - 无法使用 selenium python 单击搜索按钮
- postgresql - Django ORM:如何通过 join 或 select_related() 从 ForeignKey("self") 获取评论子项?
- r - 通过在 R 中使用 group by 有条件地聚合,从因子变量中生成级别的列
- linux - 为什么 `test -w /tv` 给出不正确的否定结果?
- micronaut - 使用 micronaut 访问记录器记录用户
- amazon-web-services - 在widevine+dash DRM视频加密中,分段mp4上没有设置签名cookie
- python - 如果我添加颜色,则 plotly express 重新排序分类 x 轴散点图
- javascript - React native App 在 IOS 模拟器上不起作用
- python - 为什么 pandas 的 replace 方法不适用于 None 作为值?
- javascript - React native navigation.setParams 没有设置任何新参数