当前位置:网站首页>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
边栏推荐
- Simulated small root pile
- 模拟小根堆
- 2022 t elevator repair operation certificate examination question bank and simulation examination
- 谷歌 Chrome 浏览器将支持选取文字翻译功能
- [matlab] communication signal modulation general function - low pass filter
- Zhongke panyun-2022 Guangdong Trojan horse information acquisition and analysis
- Two sides of the evening: tell me about the bloom filter and cuckoo filter? Application scenario? I'm confused..
- Solar insect killing system based on single chip microcomputer
- Redis realizes ranking function
- BUU-Real-[PHP]XXE
猜你喜欢

ansys命令

(4) Canal multi instance use
![[paper summary] zero shot semantic segmentation](/img/78/ee64118d86a7e43ec4d1cb97191fbe.jpg)
[paper summary] zero shot semantic segmentation

Programmers don't talk about morality, and use multithreading for Heisi's girlfriend

Simulink与Arduino串口通信

VB.net 简单的处理图片,黑白(类库——7)

模拟小根堆
![[QT] create mycombobox click event](/img/5a/ed17567a71f6737891fc7a8273df0a.png)
[QT] create mycombobox click event

2022g2 power station boiler stoker special operation certificate examination question bank and answers

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
随机推荐
How to use postman to realize simple interface Association [add, delete, modify and query]
[matlab] matlab simulation - simulate the AM modulation process of the modulation system
BUU-Crypto-Cipher
ping端口神器psping
C language simple student management system (including source code)
[matlab] general function of communication signal modulation - generation of narrow-band Gaussian white noise
Principle and practice of common defects in RSA encryption application
Notepad++--显示相关的配置
小程序毕业设计---美食、菜谱小程序
模拟小根堆
2022g2 power station boiler stoker special operation certificate examination question bank and answers
Nodejs learning document
Basic concept of bus
flink1.13 sql基础语法(一)DDL、DML
Google Chrome browser will support the function of selecting text translation
Evolution of system architecture: differences and connections between SOA and microservice architecture
[matlab] general function of communication signal modulation inverse Fourier transform
LabVIEW错误对话框的出现
Simulink与Arduino串口通信
1480. 一维数组的动态和