+ Reply to Thread
Results 1 to 6 of 6

Extract average based on date.

  1. #1
    Registered User
    Join Date
    10-16-2015
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    2

    Extract average based on date.

    I have a an Excel (2007) spreadsheet that looks like this:

    A B
    - -
    13/10/2015 348
    13/10/2015 1679
    13/10/2015 869
    14/10/2015 2635
    14/10/2015 672
    14/10/2015 124

    ...and so on. In fact there could be a hundred or so entries for each day and up to 30 individual days.

    What I want to do is: average all the values in column B for each day and put this average in another cell (in column C?), then step to the next day and do the same and put the result in a another cell in column C, and so on...

    I must admit that I haven’t used Excel in anger for at least 6 years and I have forgotten the little I used to know

    Any help would be much appreciated.

  2. #2
    Forum Contributor
    Join Date
    03-08-2011
    Location
    London
    MS-Off Ver
    Work Office 365 Home 2019
    Posts
    427

    Re: Extract average based on date.

    Do you have a sample spreadsheet you can upload?

  3. #3
    Registered User
    Join Date
    10-16-2015
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    2

    Re: Extract average based on date.

    Hi MagicMan,

    Attached is an example...
    Attached Files Attached Files

  4. #4
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Extract average based on date.

    If dates are in A3 onward, money in B3 onward and criteria is in E2 & F2 then try below formula

    =AVERAGEIFS($B$3:$B$6,$A$3:$A$6,">="&E2,$A$3:$A$6,"<="&F2)

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Have a look in attachment for better understanding.
    Attached Files Attached Files
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  5. #5
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Extract average based on date.

    Try
    C1=IF(INT(A1)=INT(A2),"",AVERAGE($B$1:B1)) and drag down.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    03-08-2011
    Location
    London
    MS-Off Ver
    Work Office 365 Home 2019
    Posts
    427

    Re: Extract average based on date.

    It's ugly as sin, but I couldn't find a way to make it match a single date.

    I've put a couple of control columns in (F and G) which takes one before your date and one after, the formula (in column H) then looks between those dates (i.e. your target date).

    I'd hide columns F and G

    I'm sure there must be a more elegant way of doing it.

+ 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. Extract string based on numerical value (Date)
    By winmaxservices1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-27-2015, 04:07 AM
  2. [SOLVED] Extract average based on month and reference
    By puiuluipui in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-23-2014, 09:07 AM
  3. Extract Data based on Date
    By ngor3431 in forum Excel General
    Replies: 1
    Last Post: 05-31-2012, 09:03 PM
  4. Macro Loop – Find Specific Times, Extract Date, Average Values of Times
    By ExcelQuestFL in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-25-2010, 02:50 PM
  5. Extract data based on date?
    By peejayw in forum Excel General
    Replies: 7
    Last Post: 12-03-2008, 09:54 AM
  6. Extract certain records based from list based on date
    By Josh_123456 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-15-2007, 01:51 AM
  7. how to extract data based on date
    By vidhya in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-18-2005, 06:05 AM

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