Copy data sheet 1 to sheet 2

Closed
DC - Jul 28, 2016 at 08:24 AM
 Blocked Profile - Jul 29, 2016 at 04:10 PM
Hello,


hi sir
i am doing one project in that my client want in sheet 1 data he needs expire date has to come sheet 2 please help me to do this

DC



Related:

1 response

YasserKhalil Posts 6 Registration date Saturday February 20, 2016 Status Member Last seen July 31, 2016 1
Jul 28, 2016 at 03:06 PM
There are not enough details
Assume that there is data in range("A1:D20") and in column D there are dates in which you need to examine the expiry dates and if found to cut the entire row to sheet2
Sub Test()
Dim Lr As Long, I As Long

Lr = Sheet1.Cells(Rows.Count, 1).End(xlUp)

Application.ScreenUpdating = False
For I = 1 To Lr
If Sheet1.Cells(I, "D").Value < Date Then
Sheet1.Cells(I, "D").EntireRow.Copy
Sheet2.Range("A" & Sheet2.Cells(Rows.Count, 1).End(xlUp).Row + 1).PasteSpecial xlPasteValues
Sheet1.Cells(I, "D").EntireRow.Delete
End If
Next I

Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
0
Blocked Profile
Jul 28, 2016 at 07:32 PM
Welcome Yasser, and thank you for your input. Please get used to minimal scope descriptions!
0
YasserKhalil Posts 6 Registration date Saturday February 20, 2016 Status Member Last seen July 31, 2016 1 > Blocked Profile
Jul 28, 2016 at 11:17 PM
If there is anything not clear .. Just tell me and I will try to explain it in plain language
0
DC > YasserKhalil Posts 6 Registration date Saturday February 20, 2016 Status Member Last seen July 31, 2016
Jul 29, 2016 at 02:39 AM
hi sir,

i dont want in macro i want to do in exel using formula can u please tell me which formula it correct for this please help me..
DC
0
Blocked Profile > YasserKhalil Posts 6 Registration date Saturday February 20, 2016 Status Member Last seen July 31, 2016
Jul 29, 2016 at 04:10 PM
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is what I was talking about! No good deed goes unpunished. Be prepared for scope creep!
0