excel - Find a date which is represented with a formula
问题描述
I assign the 1st January to cell A1. The cell formula bar displays:
01/01/2020
The cell is then formatted as Custom:
ddd", "ddmmm
So the cell displays:
Wed, 01Jan
I can use the following code to select the cell A1 (1st Jan):
ActiveSheet.Cells.Find(#1/1/2020#, , lookat:=xlWhole).Select
I assign the 2nd of Jan to cell A4. Cell A4 is formatted the same custom way and the formula bar displays:
A1+1
The cell displays:
Thu, 02Jan
When searching for the 2nd of Jan i'm getting Run-time error '91': Object variable or With block variable not set error, when I run the macro as:
ActiveSheet.Cells.Find(#2/1/2020#, , lookat:=xlWhole).Select
How can I correct the macro to find and select cell A4 that represents the cell for 2nd Jan?
解决方案
推荐阅读
- php - Netsuite - 如何获取所有项目 - 没有搜索,分页?
- html - 如何在不单独给出我的数组元素索引的情况下为我的所有数组元素提供链接?
- awk - 基于字段的第二高值
- computer-vision - 给定两个有阴影和没有阴影的相同场景的 YUV 图像,检测阴影区域
- java - 如何在 Jersey 客户端(2.25.1)中使用 PATCH 方法?
- postgresql - postgres 中的 to_number 返回错误值
- angular - AngularFirestore 数据库,HTML 表在数据更改时不会自动更新
- firebase - 如何导航到 Angular 9 中的子组件
- oracle - Oracle 12c 如何处理 DATE 数据类型的时区数据
- vhdl - 找到运算符“-”的“0”定义,无法确定“-”的精确重载匹配定义