Code does not error but no copy either
Hi Howard,
Am Mon, 15 Jul 2013 23:53:19 -0700 (PDT) schrieb Howard:
Code does not work and does not error.
Find a value in the Sheets("Sheet1").Range("A1:H11") and copy the values in columns I and K of the "found string" row to Workbooks("Book2").Sheets("Sheet1") Range("B15") and Range("D15") with next copies below the last.
Also, I know there is a cleaner way than the .Range("B100").End(xlUp).Offset(1, 0)
but I cannot find one in my archives.
try:
If Not Rng Is Nothing Then
RngI = .Cells(Rng.Row, "I")
RngK = .Cells(Rng.Row, "K")
With Workbooks("Book2").Sheets("Sheet1")
Set LRow = .Cells(.Rows.Count, "B").End(xlUp)(2)
LRow = RngI
LRow.Offset(, 2) = RngK
End With
Else
MsgBox "Nothing found"
End If
Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
|