Copy And Paste

watkins6878

Board Regular
Joined
Nov 26, 2005
Messages
96
Hi all

I have a problem I need to loop through each row in sheet 1 looking @ column K to see the the word PAID is there and if it is cut it from sheet1 and paste it to the next blank row in sheet 2 can someone point me in the right direction please

thanks in advance

Alan
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Alan

How about

Code:
Sub ccc()
  Set findit = Range("K:K").Find(what:="PAID")
  If Not findit Is Nothing Then
    Do
      findit.EntireRow.Cut Destination:=Sheets("sheet2").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
      Set findit = Range("K:K").FindNext(findit)
    
    Loop Until findit Is Nothing
  End If
End Sub


Tony
 
Upvote 0
Hi acw

When I tried your code i got (Subscript out of range) on this line

Code:
findit.EntireRow.Cut Destination:=Sheets("sheet2").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)

alan
 
Upvote 0
Hi acw

Sorry my fault I Used sheet1 and sheet2 in place of the real sheet names I replaced sheet 2 and it work great.

Thank you

Alan
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top