+ Reply to Thread
Results 1 to 3 of 3

Average data from one column based on another

  1. #1
    Registered User
    Join Date
    10-30-2011
    Location
    Tamps, FL
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    2

    Average data from one column based on another

    I am a total noob with macros. Can anyone help me? I want to have a macro that gives me the average price per day on some data. I put a sample below. Thanks for any suggestions.

    $1.52 9/1/11 0:00 1:27 AM Thu
    $0.60 9/1/11 0:00 1:26 AM Thu
    $0.97 9/1/11 0:00 1:26 AM Thu
    $1.83 9/1/11 0:00 1:15 AM Fri
    $0.37 9/1/11 0:00 1:15 AM Fri
    $0.76 9/1/11 0:00 1:08 AM Fri
    $1.51 9/1/11 0:00 1:05 AM Sat
    $2.63 9/1/11 0:00 1:01 AM Sat
    $0.59 9/1/11 0:00 12:58 AM Sun
    $0.40 9/1/11 0:00 12:54 AM Mon
    Last edited by hpappy; 10-30-2011 at 07:29 PM. Reason: Solved

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Average data from one column based on another

    Hello hpappy,

    Welcome to the Forum!

    You can use SubTotals from menu under Data to get the average for each day. Each column Needs a header . After you added the headers, select the headers and the Data.
    1. On the menu select Data > Subtotals...
    2. Select the column with the day in the drop down labeled At each change in:
    3. Select Average in the drop down labeled Use function:
    4. Select the column that contains the amounts in the drop down labeled Add subtotal to:
    5. Click OK
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    10-30-2011
    Location
    Tamps, FL
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    2

    Re: Average data from one column based on another

    Very cool! Thanks for the welcome and the help!

+ 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