+ Reply to Thread
Results 1 to 6 of 6

Average of first three days of the week

  1. #1
    Forum Contributor
    Join Date
    08-22-2010
    Location
    mumbai
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    176

    Average of first three days of the week

    Hi,
    I have following data
    Column A Name of the company
    Column B Date
    Column C Day
    Column D Week of the Year
    Column E High Price
    Column F Low Price

    My requirement is I need the average high price for the first three days of the week i.e Mon, Tue, Wed in Column I and average Low Price for the remaining days is Thu, Fri, Sat , Sun in Column J.

    If in some case any day is missing then average high / Low price for the next two days is to be calculated.

    I have attached the excel sheet for my requirement.

    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Average of first three days of the week

    Hi goodboy,

    I think you can accomplish this with a fancy pivot table. See the attached showing how to filter a pivot by first 3 days of a week and then only using the maximum and then averaging those values. I don't think I did exactly what you want but it should give you some ideas on how I'd attack the problem.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    08-22-2010
    Location
    mumbai
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    176

    Re: Average of first three days of the week

    Thanks I need the formula also if possible

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Average of first three days of the week

    Why? You want to filter some data and then find the maximum and then average the maximums of filtered data. A pivot table does all these and you want to do the problem in a HARDER way. It all seems backwards to me..

    Look at Array formulas to pull out weekdays of 2,3,4 and then Large functions to pull out the 1,2,3 largest values. Then you can Sum them and divide by 3 or use the Average formula.

    Your needing "A formula" is like asking to need the Sum divided by the count instead of being able to use the "Average" function.

    I'd suggest you look at the possibilities available in a Pivot Table kind of answer. Maybe it will allow you to get more answers and easier than using basic formulas.

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,459

    Re: Average of first three days of the week

    If you keep insist on using a formula:
    Try in I4,J4,M4,N4:
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    With 2007+, it become easier alot with AVERAGEIFS.
    Quang PT

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Average of first three days of the week

    Hi,

    See attached

    Late edit: Just realised. If you only have XL2003 ignore this response. I'd missed that salient point.
    Attached Files Attached Files
    Last edited by Richard Buttrey; 02-09-2014 at 01:27 PM. Reason: additional info
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Average of first three days of the week

    @MarvinP

    Neat. I like 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. Sum days to week
    By elad in forum Excel General
    Replies: 4
    Last Post: 09-13-2012, 02:24 AM
  2. days of the week
    By x4paul in forum Excel General
    Replies: 4
    Last Post: 11-07-2011, 12:55 PM
  3. calculate business days(where there is 6 days a week)
    By arnab0711 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-09-2011, 10:09 AM
  4. Translate ~Number of days in a week to number of days across months
    By martin ridley in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-26-2008, 01:09 PM
  5. Todays date + 28 days + 2 week days
    By tubbsy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-18-2008, 12:39 PM

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