+ Reply to Thread
Results 1 to 5 of 5

Extracting records by date then calculating

  1. #1
    Registered User
    Join Date
    05-07-2008
    Posts
    4

    Extracting records by date then calculating

    Hi,
    I have 2 columns of data, one is a date column and another a number column. Dates are often duplicated many times as there are multiple observations (numbers) per day. I need to extract all the values for each day, then find the median of these and return the result, so I have one single figure for each day in a new column. I think this involves a search by function such as VLOOKUP combined with the calculation to aggregate the results but don't seem to be getting anywhere.

    Any ideas would be appreciated. Thanks
    P

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Something like:

    =MEDIAN(IF($C$5:$C$12=E5,$D$5:$D$12))

    where C5:D12 contain your table and E5 contains the date to find the median for.

    Adjust the ranges and reference to suit and then confirm the formula with CTRL+SHIFT+ENTER not just ENTER...you will see { } brackets appear around the formula. You can then copy it down.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    04-18-2008
    Posts
    80
    have you considered using a pivot table?

  4. #4
    Registered User
    Join Date
    05-07-2008
    Posts
    4
    No I haven't tried pivot reports, but I'll look into that thanks.
    P

  5. #5
    Registered User
    Join Date
    04-18-2008
    Posts
    80
    Here is an example that might give you something similar to what you want. there is a macro that is set so when the observation column changes it updates the pivot table.
    Attached Files Attached Files

+ 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