+ Reply to Thread
Results 1 to 3 of 3

Finding the difference between the first and last trading days of a quarter

  1. #1
    Registered User
    Join Date
    05-17-2011
    Location
    Columbus, OH
    MS-Off Ver
    Excel 2003
    Posts
    3

    Finding the difference between the first and last trading days of a quarter

    In the A column I have the date of the trading day from Jan. 3rd 1950 - present
    A2 = 12/31/2010
    A15350 = 1/3/1950
    In the B column I have the closing value of the S&P 500 from Jan. 3rd 1950 - present
    B2 = 1257.64
    B15350 = 16.66
    I want to design a formula to find the difference between the first and last trading day of each quarter. E.g. B65-B2

    Not every quarter starts on the first of the month of the month and ends on the 30th or the 31st due to holidays.

    I am getting stuck and any help would be greatly appreciated.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Finding the difference between the first and last trading days of a quarter

    what defines the start of each quarter?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Finding the difference between the first and last trading days of a quarter

    • Arrange your data so the dates are in ascending order in Col_A with the associated prices in Col_B

    • Then build this 2-column, Year/Qtr table...mine starts in G1:H1
    1950 1
    1950 2
    1950 3
    1950 4
    1951 1
    1951 2
    1951 3
    1951 4
    1952 1
    etc

    • This regular formula returns the EOQtr-BOQtr, Col_B difference for
    the first pair: 1950, Q1
    Please Login or Register  to view this content.

    Copy that formula down as far as you need to get the 1950-Q2, 1950-Q3, etc differences.
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

+ 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