Hi all, I'm sure this question must have been asked before but I can't find the answer.
I have some code already that filters a data set by the criteria "yesterday" in column A.
The results it returns can vary from 0 rows to over 100 - and the row numbers can be different each time.
I need a bit of code to complete my formula - I need the code to select the rows that have been filtered by my existing code (yesterday date entries) and copy them (if copying by rows isn't practical then the colum range is A:R)
If there are 0 rows then to stop the macro, if there is only 1 row then it needs to be copied. I don't want to include the headers in row 1.
Please can someone help me with this
Try this in your VBA
Loop While ActiveCell.EntireRow.Hidden = True
Hi
You can use advance filter
A macro is wtitten in the attached
Regard
Last edited by mahju; 02-01-2012 at 10:47 AM. Reason: Corrected
Mahju
Mark the thread as solved if you are satisfied with the answer
Rule 9
Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.
You could try
AlfSet Rng = ActiveSheet.AutoFilter.Range Rng.Offset(1, 0).Resize(Rng.Rows.Count - 1).Copy
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks