+ Reply to Thread
Results 1 to 11 of 11

Delete entire row if date in column A is a weekend day or holiday

  1. #1
    Registered User
    Join Date
    05-12-2018
    Location
    Breda
    MS-Off Ver
    2016
    Posts
    3

    Delete entire row if date in column A is a weekend day or holiday

    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?

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Delete entire row if date in column A is a weekend day or holiday

    and where are the holidays located ?

    Kind regards
    Leo

  3. #3
    Registered User
    Join Date
    05-12-2018
    Location
    Breda
    MS-Off Ver
    2016
    Posts
    3

    Re: Delete entire row if date in column A is a weekend day or holiday

    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.

  4. #4
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Delete entire row if date in column A is a weekend day or holiday

    Like this
    Please Login or Register  to view this content.
    Cheers

  5. #5
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Delete entire row if date in column A is a weekend day or holiday

    Or much faster

    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Delete entire row if date in column A is a weekend day or holiday

    Or much much faster when bulky data.
    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Delete entire row if date in column A is a weekend day or holiday

    @jindon,
    nice way to filter weekdays

  8. #8
    Registered User
    Join Date
    05-12-2018
    Location
    Breda
    MS-Off Ver
    2016
    Posts
    3

    Re: Delete entire row if date in column A is a weekend day or holiday

    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.

  9. #9
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Delete entire row if date in column A is a weekend day or holiday

    Use the Reply or Reply to Threat button instead of Reply With Quote button and test the code.

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Delete entire row if date in column A is a weekend day or holiday

    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.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Delete entire row if date in column A is a weekend day or holiday

    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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Weekend and Holiday Exclusion From Count
    By Winship in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-04-2017, 05:25 PM
  2. [SOLVED] Long Weekend Formula for Holiday
    By Perk1961 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-27-2015, 04:30 AM
  3. Weekend and Holiday analysis with Time
    By leenie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-27-2014, 12:46 PM
  4. [SOLVED] Determine last date of attendance as we considered weekend, public holiday and absent date
    By ashburnadam in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2012, 12:08 AM
  5. [SOLVED] Sum Weekend and Holiday Values Based on a Date Range in another Cell
    By GiGi320 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-27-2012, 11:53 AM
  6. how to sum day if it falls in a weekend or holiday?
    By jgomez in forum Access Tables & Databases
    Replies: 2
    Last Post: 11-30-2011, 01:54 PM
  7. Time difference - without weekend/holiday
    By blizard in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-08-2005, 03:14 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1