+ Reply to Thread
Results 1 to 6 of 6

Formula for days counting

  1. #1
    Registered User
    Join Date
    07-25-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    12

    Formula for days counting

    Hi

    I have two sets of data. The first one is Accounting Year End of each firms, and the second set of data is Trading days of each firms (assigned as 0 or 1). My aim is to count the number of trading days in each accounting year of each firm. I use Code as the key factor to link two sets of data.

    I struggle to link two files because,
    1) accounting year ended of each firm can be changed
    2) the first file, accounting year end, is annual data; whereas the second file is daily data.

    For example,Firm 26360V, its year ended for 2005, my counting will cover 30/09/04 to 30/09/05. There is no counting for 2006. Then, for year 2007, my counting will cover 31/03/06-31/03/07 (however, there' is the date 30/03/07 but no 31/03/07 because it is the weekend)

    How can I create the formula. I also attach the example file

    Thank you very much for your help.
    Attached Files Attached Files
    Last edited by than_k22; 11-19-2010 at 04:48 AM.

  2. #2
    Registered User
    Join Date
    07-25-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Count the date of different accounting years data

    anybody, please? Or I do not explain my question clearly..

  3. #3
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: Formula for days counting

    Hi,

    Try the attached. It uses MATCH to find the first trading date and the last for the year in question, then OFFSET to find the range between these two, then SUM to add up the non-zero entries.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: Formula for days counting

    BTW, 2006 year end date for 926348 appears to be text - you need to make sure it's a numeric date.

  5. #5
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: Formula for days counting

    its year ended for 2005, my counting will cover 30/09/04 to 30/09/05
    I assume you meant 1/10/04 to 30/09/05 - I wrote my formulae on this assumption.

  6. #6
    Registered User
    Join Date
    07-25-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Formula for days counting

    Thanks OutoftheHeat. I will check with the my complete data and I will confirm you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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