Hi guys,
I need help with macro
I need macro, that will be copy value from cells in column B from sheet1 to first avaible (free) cell in column D of sheet2 under condition that in cell in column F of sheet1 (in that row) is value "yes". After that i need to remove that row in sheet1. I have something like this at this moment:
I hope you can help me.
Please!
I need help with macro

I need macro, that will be copy value from cells in column B from sheet1 to first avaible (free) cell in column D of sheet2 under condition that in cell in column F of sheet1 (in that row) is value "yes". After that i need to remove that row in sheet1. I have something like this at this moment:
Rich (BB code):
Sub ddd()
Dim OstW As Long
Dim kom As Excel.Range
Application.ScreenUpdating = False
With Sheets("Sheet1")
OstW = .Cells(Rows.Count, "F").End(xlUp).Row
For Each kom In .Range("F4:F" & OstW)
If kom.Value = "yes" Then
Range("B4:B").Copy
With Sheets("Sheet2")
Range("D5:D").PasteSpecial
Paste = xlPasteValues
End With
.Rows(kom.Row).Delete
End If
Next kom
End With
Application.ScreenUpdating = True
End Sub
I hope you can help me.
Please!
