+ Reply to Thread
Results 1 to 4 of 4

Filter for working days

  1. #1
    Registered User
    Join Date
    07-07-2015
    Location
    Rotterdam, the Netherlands
    MS-Off Ver
    1997-2003
    Posts
    2

    Filter for working days

    Dear all,

    I have a dataset with stockprices and dayreturns of the Dutch Stock Market in the period of 1990-2015. I would like to test a sort of theory, which states that the first 3 exchange days and the last exchange day of the month generates a significantly higher dayreturn compared to the other days of the month. I would like to give these days a dummy number of 1. All the other days of the month are given the number of 0. The problem contains the follows: Due to the large amount of dayreturns I couldn't configure this manually. I probably need a formula which helps me to get further on. The second problem is that the exchange days differ from month to month and year to year due to different ending dates (28,30,31) and including weekends and holidays (these weekends and holidays are not considerd in my dataset). And even if I would do this manually, I first have to find out which days are last days of the month and that takes a lot of time. I hope that excel contains a formula which can help me. I'm thinking about an If condition, but don't know the exact characters.

    I attached my workfile to this message.

    Best regards,

    Tim Lader
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Filter for working days

    See if this is what you want. Seems like you already have only trading days listed so it' s just a matter of checking them off.
    I put "X" in the first 3 positions (D4,D5,D6).
    In D7 copied down

    =IF(MONTH(A7)<>MONTH(A4), "X", IF(MONTH(A8)<> MONTH(A7),"X",""))
    Does that work for you?
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Valued Forum Contributor
    Join Date
    10-10-2012
    Location
    New York
    MS-Off Ver
    Excel 2007/2010
    Posts
    337

    Re: Filter for working days

    The good news is that the file you attached already has the weekend days removed. In the attached file, filter column G to show "1" for the first 3 days and the last day of the month. As for holidays, you need to do that manually because I don't know what are and are not Dutch Bank Holidays.

    AEX RENDEMENT (solution for timanjo1).xls
    Don't just use the answers provided for you. Try to understand how it works by reverse engineering or asking about it.

    Please mark the thread as [SOLVED] (Thread Tools->Mark thread as Solved) when answered.
    If you're happy with an answer given, please click the * under the person's name to boost their reputation.

  4. #4
    Registered User
    Join Date
    07-07-2015
    Location
    Rotterdam, the Netherlands
    MS-Off Ver
    1997-2003
    Posts
    2

    Re: Filter for working days

    Thank you both guys! You really helped me out. The weekend and Dutch bank holidays were indeed already filtered out. You both came with different formulas, but with the right solution.

    I would like to thank you both.

    Best regards,

    Tim Lader

+ 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] Count 6 working days (excluding Sunday, Holidays & half days)
    By eve_star1 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-29-2015, 08:00 AM
  2. Calculate total working days and excepted leave days
    By megaiooo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-21-2013, 09:29 AM
  3. Working with Dates, VB MAcro to Auto Filter on last 7 days
    By Rikkdh in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 06-20-2013, 10:01 AM
  4. Show days in a month dynamically + working days
    By vemix in forum Excel General
    Replies: 5
    Last Post: 12-28-2012, 07:54 AM
  5. Previous working days date (Mon-Fri working week).
    By intothewild in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-22-2011, 01:00 PM

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