• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to automatically move data from one sheet to another (Cut-Paste Automatically)

gordons

New Member
Dear All,

I have difficult time to move data from sheet1 to sheet2 automatically when the column 'T' is >0. (file Attached)

Can anyone give me solution please?

Best Regards,
 

Attachments

  • Project_Example2.xlsx
    28 KB · Views: 9
Hi Gordons

Attach the following to your button.

Code:
Sub MoveIt()
  [T9:T1000].AutoFilter 1, ">0"
  [B10:EG10000].Copy Sheet2.Range("B65536").End(xlUp)(2)
  [t9].AutoFilter
End Sub

Your post needs more detail though as you have not said if you want the data to consolidate or replace what is there. What happens when you run it a second time?

Take care

Smallman
 
Hi,

How about the below macro

Code:
Sub moveitem()
 
 
LR = Range("C" & Rows.Count).End(xlUp).Row
 
For i = 10 To LR
 
If Range("T" & i).Value > 0 Then
 
Rows(i & ":" & i).Cut
Sheets("Sheet2").Select
 
Er = Range("C" & Rows.Count).End(xlUp).Row + 1
Range("A" & Er).Insert Shift:=xlDown
Sheets("Sheet1").Select
 
 
End If
 
Next
 
Range("C10").Select
 
Do While ActiveCell.Row <> LR
 
If ActiveCell.Value = "" Then
Selection.EntireRow.Delete
 
Else
ActiveCell.Offset(1, 0).Select
 
End If
Loop
 
 
 
End Sub
 
Back
Top