+ Reply to Thread
Results 1 to 5 of 5

Daily Average of 50,000 data points, different number of data points each day

  1. #1
    Registered User
    Join Date
    05-29-2008
    Posts
    2

    Daily Average of 50,000 data points, different number of data points each day

    So here's my problem:

    I have about 200,000 rows that look like this:

    date|trade size|tradevolume
    20020101|3,000|100,000
    20020101|7,000|140,000
    20020101|1,000|120,000
    20020101|4,000|170,000
    20020101|3,000|130,000
    20020101|3,000|170,000
    20020101|2,000|190,000
    ...
    20021031|1,000|200,000

    What I need is a DAILY average trade size, so that Excel averages all the sizes with date 20020101, 20020102, etc and spits out an individual average trade size for each day. Then I need the median of all those daily average trade sizes. It's especially hairy because the data is spread across multiple sheets since Excel 2003 (the version I'm using) can only handle ~65,000 rows per sheet. Any guidance on how to do this would be appreciated.

    There are 180 days so the whole thing needs to be automated, it's not practical to do the same procedure 180 times. Also, it's not like there are 1000 observations on day 1 and then 1000 observations on day 2. 20020101 may have 1,238 observations while 20020102 has 1,437 so I need to use the column with the date to group the trade sizes for averaging somehow.
    Last edited by nfg05; 05-29-2008 at 12:25 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    I'm on Excel 2000 so I am not sure but can Excel 2003 handle pivot tables with data across multiple sheets? A pivot table can give you averages by day and min/max values. I think with 2003 you can set up formulas too (MEDIAN function). Hope that helps.

    ChemistB

  3. #3
    Forum Contributor
    Join Date
    12-02-2004
    Location
    London
    Posts
    255
    If you use Data | Import External Data | Import New Dataase Query

    you can create a new query using Microsoft Query. This is similar to the query tool in Access. A parameter query could be created to select the date required for your calculation. When the data is returned, it can be refreshed as many times as required.

    A sample file would help, as I could create you a solution.

  4. #4
    Registered User
    Join Date
    05-29-2008
    Posts
    2
    Thank you all for your responses. I ended up figuring out a solution using the sumif and countif functions. Unfortunately, they don't work in 3D so I had to do it for each sheet, but it worked out in the end nonetheless.

  5. #5
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Quote Originally Posted by nfg05
    Thank you all for your responses. I ended up figuring out a solution using the sumif and countif functions. Unfortunately, they don't work in 3D so I had to do it for each sheet, but it worked out in the end nonetheless.
    If you download and install the free add-in Morefunc.xll, you can use the THREED function.

    Hope this helps!

+ 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