|
- Sub ddddd()
- Dim Rng As Range, oRng As Range, oRng1
- Dim oDate As Date
- Set Rng = Sheet4.Range("A1:A6000")
-
- 'Application.FindFormat.NumberFormat = "yyyy/m/d"
- oDate = "2022/3/1"
- Set oRng1 = Rng.Find(What:=oDate, LookAt:=xlPart)
- Debug.Print oRng1.Address
-
- Set oRng2 = Rng.Find(What:="2022/3/1", LookIn:=xlFormulas, _
- LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
- MatchCase:=True, SearchFormat:=True)
-
- Set oRng3 = Rng.Find(What:="2022/3/1", After:=ActiveCell, LookIn:=xlFormulas, _
- LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
- MatchCase:=True, SearchFormat:=True)
-
-
- Debug.Print oRng.Address
- End Sub
复制代码
|
|