Hello,
I am very new to VBA and macros in Excel. I have a very large excel spreadsheet in which column A holds dates. I am trying to delete the rows where the date is a weekend day or holiday.
Can somebody help, please?
Hello,
I am very new to VBA and macros in Excel. I have a very large excel spreadsheet in which column A holds dates. I am trying to delete the rows where the date is a weekend day or holiday.
Can somebody help, please?
and where are the holidays located ?
Kind regards
Leo
Hi Leo, thanks for the reply.
I have not introduced a variable for the holidays. They are also few, so I may remove them manually. The biggest issue is removing the rows for the weeekend dates.
Cheers.
Like this
CheersPlease Login or Register to view this content.
Or much faster
Please Login or Register to view this content.
Or much much faster when bulky data.
Please Login or Register to view this content.
@jindon,
nice way to filter weekdays
Hi jindon, thanks for the reply. I prefer to delete the weekend rows rather than filter weekdays.
Last edited by AliGW; 05-12-2018 at 11:04 AM. Reason: Unnecessary quotation removed.
Use the Reply or Reply to Threat button instead of Reply With Quote button and test the code.
It should delete the rows that are Sat or Sun.
if you want it other way around, means leave weekends, change the formula to
Please Login or Register to view this content.
Rule 08: Cross-posting Without Telling Us
Your post does not comply with Rule 8 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.
Post a link to any other forums where you have asked the same question. If you have fewer than 10 posts here, you will not be able to post a link, but you must still tell us where else you have asked the question.
Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.
Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!
Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
No further help to be offered, please, until the OP has complied with this request.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks