3
I need to move some data from one sheet to the other according to the date, but the sealing I made using the IF command only selects the last cell that reaches this criterion ignoring the others.
What I got so far:
Sub Copiar()
Dim range1 As Range
Set range1 = Range("k56:k58")
For Each cell In range1
If cell.Value = Range("R55").Value Then
cell.Offset(0, 2).Select
Selection.Copy
Sheets("Plan2").Activate
Range("r56").Select
ActiveSheet.Paste
End If
Next
End Sub
Hi, thanks for the reply, I tried the two codes, but none worked =/
– mixelsan
Checked if the worksheet name is correct in
Sheets()
?– danieltakeshi
I did it now, it worked perfectly, the criteria was wrong, I changed: If Cell. Value = Ws.Range("R55"). Value Then To: If Cell.Value = Sheets("Plan1"). Range("R55"). Value Then
– mixelsan