当前位置:网站首页>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
边栏推荐
- BUU-Crypto-Cipher
- Unity2d -- character moves and turns
- Supplement the JS of a video website to decrypt the video
- 【QT】制作MyComboBox点击事件
- fastjson
- Zzulioj:1201: mode problem
- Introduction To AMBA 简单理解
- Halcon图片标定,使得后续图片处理过后变成与模板图片一样
- [wechat applet] template and configuration (wxml, wxss, global and page configuration, network data request)
- 数据标注是一块肥肉,盯上这块肉的不止中国丨曼孚科技
猜你喜欢
【兴趣阅读】Adversarial Filtering Modeling on Long-term User Behavior Sequences for Click-Through Rate Pre
[paper summary] zero shot semantic segmentation
Introduction to AMBA
Topological sorting and graphical display of critical path
19.Frambuffer应用编程
What are the reasons for the frequent high CPU of ECS?
VB. Net GIF (making and disassembling - optimizing code, class library - 5)
BUU-Crypto-[HDCTF2019]basic rsa
Automated testing selenium foundation -- webdriverapi
BUU-Real-[PHP]XXE
随机推荐
力扣(LeetCode)184. 部门工资最高的员工(2022.07.03)
How to use postman to realize simple interface Association [add, delete, modify and query]
2022年A特种设备相关管理(电梯)考试题模拟考试平台操作
[matlab] matlab simulation modulation system - DSB system
JS string splicing
c语言经典指针和数组笔试题解析
Flink1.13 basic SQL syntax (II) join operation
谷歌 Chrome 浏览器将支持选取文字翻译功能
Google Chrome browser will support the function of selecting text translation
Just do it with your hands 7 - * project construction details 2 - hook configuration
Redis realizes ranking function
Halcon图片标定,使得后续图片处理过后变成与模板图片一样
1480. Dynamic sum of one-dimensional array
[matlab] matlab simulation of modulation system - power spectrum and coherent demodulation of AM modulated signal
[high concurrency, high performance and high availability of massive data MySQL practice-7] - memory data drop disk
Descriptive analysis of data distribution characteristics (data exploration)
ETCD数据库源码分析——初始化总览
空洞卷积、可变形卷积、可变形ROI Pooling
VB. Net GIF (making and disassembling - optimizing code, class library - 5)
BUU-Pwn-test_ your_ nc