Hello Master,
I want to find date for example "29-Nov-2014" with range (B7:F2000).
When i search date and show the result i want copy the result with range A7:EJ:2000)
this is my code
and i upload my file excel to help running
Thanks
AsparAgus
I want to find date for example "29-Nov-2014" with range (B7:F2000).
When i search date and show the result i want copy the result with range A7:EJ:2000)
this is my code
Code:
Sub Sample1()
Dim oSht As Worksheet
Dim lastRow As Long, i As Long
Dim strSearch As String
Dim t As Long
Dim aCell As Range
t = GetTickCount
On Error GoTo Err
Set oSht = Sheets("Monitoring List CKD NSeries")
lastRow = oSht.Range("D" & Rows.count).End(xlUp).Row
strSearch = Format(Date + 3, "dd-mmm-yy")
Set aCell = oSht.Range("BD7: D" & lastRow).Find(What:=strSearch, LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
If Not aCell Is Nothing Then
MsgBox "Value Found in Cell " & aCell.Address & vbCrLf & _
"and it took " & GetTickCount - t & "milliseconds"
End If
Exit Sub
Err:
MsgBox Err.Description
End Sub
Thanks
AsparAgus