hi,
I have column with different dates in column A. I am trying to delete all rows for which date is not equal to yesterdays date.
how can we achieve that?
Thanks,
Shiva
hi,
I have column with different dates in column A. I am trying to delete all rows for which date is not equal to yesterdays date.
how can we achieve that?
Thanks,
Shiva
Keep the Forum clean :
1. Use [ code ] code tags [ /code ]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
2. Show appreciation to those who have helped you by clicking * Add Reputation below their posts.
3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.
Please Login or Register to view this content.
Hope this helps
Sometimes its best to start at the beginning and learn VBA & Excel.
Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
Available for remote consultancy work PM me
Thanks for the code..
I am getting run time error 424 " Object Required "
Line noted in red below.
Please Login or Register to view this content.
i also tried this logic but not working
Please Login or Register to view this content.
sheets("Sheet20").UsedRange.Columns(1).Rows.Count To 1 Step -1
It is working.. But other way around.
Sorry for not being clear. I want VBA to keep only yesterdays Date and delete all other date.
Eg.
07/07/2014
07/08/2014
07/09/2014
I want VBA to delete all other date but to keep 07/08/2014 which is of yesterdays date as on today. So this date would change everyday.
Thanks,
Thanks Natan. Few modification and I got it working
Please Login or Register to view this content.
Hi shiva_reshs,
Try this (though initially on a copy of your data as the results cannot be undone if they're not as expected):
HTHPlease Login or Register to view this content.
Robert
____________________________________________
Please ensure you mark your thread as Solved once it is. Click here to see how
If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post
Thanks Robert ...
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks