Dear all,
I have a spreadsheet with different pharmaceuticals and need to make sure the expiration date is not missed. Therefore i would like to have a button to press every time i upload new data to the sheet. I would like the whole row copied if the date is under todays date - Let's say the date in H2 is under todays date, then i would like for A2-L2 copied into the next sheet. Notice that some of the cells are empty. The attached excel file is a small part of the larger excelsheet with around 11.000 rows
From looking at kinda similar questions I ended up with this VBA code, which does not work.
Sub CopyRows()
'MakroCopyRows
Application.ScreenUpdating = False
With Sheet1.[H1].CurrentRegion
.AutoFilter 7, "<" & [Today()]
.Offset(1).Copy Sheet3.Range("A" & Rows.Count).End(3)(2)
.AutoFilter
End With
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
I hope you guys can help out.
Regards,
Esebn
Bookmarks