LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default Cut and Paste macro

I need to fix my macro. It is giving me an error message.

The macro is supposed to do this: if the value in column B is less than
zero, the macro should cut the entire row and paste it into the last
available row. It should check rows 1- 199. Thank you in advance

Sub CutandPaste()


Dim i As Integer
LRow = Range("A1").End(xlUp).Row

For i = 9 To 199

If Cells(i, 2) 0 Then
EntireRow.Cut Destination:=Range("a1:a" & LRow).PasteSpecial
End If
Next i

End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PLEASE help with cut/paste macro [email protected] Excel Discussion (Misc queries) 2 August 2nd 07 06:22 PM
cut and paste macro wally Excel Worksheet Functions 6 December 12th 06 03:51 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM
Cut&Paste Macro [email protected] Excel Worksheet Functions 5 April 8th 05 03:51 PM


All times are GMT +1. The time now is 08:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"