Excel精英培训网

 找回密码
 注册

时间区间

已有 479 次阅读2016-4-23 21:34

Sub celia()
For i = 1 To 2
If TimeValue("6:0:0") < Cells(i, 1) And Cells(i, 1) < TimeValue("7:0:0") Then
MsgBox "ok"
End If
Next
mycount = Application.WorksheetFunction.CountIfs(Columns("a:a"), ">" & TimeValue("6:0:0"), Columns("a:a"), "<" & TimeValue("7:0:0"))
If mycount >= 1 Then MsgBox "pass"
End Sub

评论 (0 个评论)

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-6-29 08:15 , Processed in 0.291165 second(s), 5 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

返回顶部