当前位置:网站首页>Excel 比较日器
Excel 比较日器
2022-07-04 05:21:00 【wpyok168】
Private Sub CheckDate_Click()
Dim i As Integer, r As Integer, num As Integer
Dim T1, T2 As Date
Dim lie As Integer
lie = 15 '列号15 即 O 列
num = 0 '统计次校日期到期数量
r = Range("o65536").End(xlUp).Row '统计o列有数据的单元格个数有多少
T2 = Now() - 30 '当前日期往前30天
'T1 = VBA.DateSerial(2022, 6, 26)'日期转换
'T1 = Range("A1").Value'获取单元格的值
'循环单元格数据
For i = 1 To r
T1 = Cells(i, lie)
If (IsEmpty(T1)) Then
Cells(i, lie).Interior.Pattern = xlNone '清除背景色
ElseIf (T1 < T2) Then
'MsgBox ("仪器校验日期过期了")
Cells(i, lie).Interior.Color = 255 '填充红色
num = num + 1
Else
Cells(i, lie).Interior.Pattern = xlNone '清除背景色
End If
Next
If (num > 0) Then
Dim result
result = MsgBox("总共有" + Str(num) + "个设备到期,需安排校正!", vbExclamation)
End If
End Sub
边栏推荐
- What are the reasons for the frequent high CPU of ECS?
- [matlab] general function of communication signal modulation inverse Fourier transform
- transformer坑了多少算力
- Principle and practice of common defects in RSA encryption application
- Flutter ‘/usr/lib/libswiftCore. dylib‘ (no such file)
- left_and_right_net可解释性设计
- JS string splicing enhancement
- 2022年A特种设备相关管理(电梯)考试题模拟考试平台操作
- Notepad++--显示相关的配置
- Unity is connected to the weather system
猜你喜欢

2022 t elevator repair operation certificate examination question bank and simulation examination

Flutter calls Gaode map app to realize location search, route planning and reverse geocoding

Just do it with your hands 7 - * project construction details 2 - hook configuration
![[技术发展-25]:广播电视网、互联网、电信网、电网四网融合技术](/img/87/e0469e280365ed0261e2b551ebd888.png)
[技术发展-25]:广播电视网、互联网、电信网、电网四网融合技术

2022 Guangdong provincial competition - code information acquisition and analysis flag

Topological sorting and graphical display of critical path

C # character similarity comparison general class

拓扑排序和关键路径的图形化显示

How to configure static IP for Kali virtual machine

Automated testing selenium foundation -- webdriverapi
随机推荐
flink1.13 sql基础语法(一)DDL、DML
[matlab] general function of communication signal modulation bandpass filter
Build an Internet of things infrared temperature measuring punch in machine with esp32 / rush to work after the Spring Festival? Baa, no matter how hard you work, you must take your temperature first
LM小型可编程控制器软件(基于CoDeSys)笔记二十二:错误4268/4052
Flask
[matlab] matlab simulation - low pass Gaussian white noise
1.1 history of Statistics
2022g2 power station boiler stoker special operation certificate examination question bank and answers
光模塊字母含義及參數簡稱大全
Topological sorting and graphical display of critical path
Solar insect killing system based on single chip microcomputer
Appearance of LabVIEW error dialog box
Void convolution, deformable convolution, deformable ROI pooling
[untitled]
力扣(LeetCode)184. 部门工资最高的员工(2022.07.03)
[paper summary] zero shot semantic segmentation
What are the reasons for the frequent high CPU of ECS?
[matlab] matlab simulation modulation system SSB system
[paper summary] zero shot semantic segmentation
Programmers don't talk about morality, and use multithreading for Heisi's girlfriend