jaclynresendez
New Member
- Joined
- Jan 20, 2009
- Messages
- 19
What I want this code to do is find the date on Paste!B2 in Tracker! Range(A3:IQ2), stepdown 2 cells, and paste the data copied from a previous sub. It's prolly all messed up, I know. Everything works except finding the date. Right now, it pastes the data wherever the activecell is which is not good. Code below:
Sub Find_Last()
Dim FindString As String
Dim Rng As Range
FindString = Sheets("Paste").Range("B2").Value
If Trim(FindString) <> "" Then
With Sheets("Tracker").Range("A3:IQ3")
Set Rng = .Find(What:=FindString, _
After:=.Cells(1), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False)
If Not Rng Is Nothing Then
Application.Goto Rng, True
ActiveCell.Offset(2, 0).Select
End If
End With
End If
Sheets("Tracker").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("LOOKUP").Visible = False
End Sub
Sub Find_Last()
Dim FindString As String
Dim Rng As Range
FindString = Sheets("Paste").Range("B2").Value
If Trim(FindString) <> "" Then
With Sheets("Tracker").Range("A3:IQ3")
Set Rng = .Find(What:=FindString, _
After:=.Cells(1), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False)
If Not Rng Is Nothing Then
Application.Goto Rng, True
ActiveCell.Offset(2, 0).Select
End If
End With
End If
Sheets("Tracker").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("LOOKUP").Visible = False
End Sub