Anomandaris
04-17-2009, 08:27 AM
Hi, its me again, I'm seem to have messed up this simple macro. Basically Any Row with Cell.Value = "SOLD" in Column K should be sent to Sheet2 from Sheet1. (It doesnt have to be the entire Row, I need columns A to L, but entire row is fine too)
any idea why this code isnt working? thanks
Sub fig()
Dim cell As Range
Dim x As Integer
Dim Rng As Range
Dim Row As Range
x = Sheet1.Range("K" & Rows.Count).End(xlUp).Row
Set Rng = Sheet1.Range("K4:K" & x)
For Each cell In Rng
If cell.Value = "SOLD" Then
cell.EntireRow.Cut
Sheet2.Select
Range("A4").Select
Selection.Paste
End If
Next cell
End Sub
any idea why this code isnt working? thanks
Sub fig()
Dim cell As Range
Dim x As Integer
Dim Rng As Range
Dim Row As Range
x = Sheet1.Range("K" & Rows.Count).End(xlUp).Row
Set Rng = Sheet1.Range("K4:K" & x)
For Each cell In Rng
If cell.Value = "SOLD" Then
cell.EntireRow.Cut
Sheet2.Select
Range("A4").Select
Selection.Paste
End If
Next cell
End Sub