Mismatch Error
Posted by Sam on June 21, 2001 11:27 AM
I keep getting a mismatch error with the macro below if someone has ideas on how to fix it that would be great.
Thanks,
Sam
Sub test()
LastRow = ActiveSheet.UsedRange.Rows.Count
Range("A2").Select
Do Until Selection.Row > LastRow
If Selection.Value = "AL_Ship_Motion" Then
cCell = ActiveCell.Address
Range("B55:E55").Select
Selection.Copy
Range(cCell).Offset(0, 7).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
LastRow = LastRow - 1
Else
Selection.Offset(1, 0).Select
End If
Loop
End Sub