+ Reply to Thread
Results 1 to 2 of 2

Help With Conditional Averaging Based On Column Header...

  1. #1
    Registered User
    Join Date
    01-15-2014
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    1

    Question Help With Conditional Averaging Based On Column Header...

    Hello everyone,

    I am having trouble figuring out how to execute the following function:

    I have dates of business in my top row as headers. My first column consists of a list of items that are sold. Below each date header, we enter the quantity sold for a particular item on that date. Each row represents a different item. I would like to keep a running average of the number of each item sold based on whether it was a TU-W-TH or a FRI-SAT. The application for this would be used in a restaurant setting to keep track of the running sales mix of menu items sold during the week versus on the weekend. This average quantity would be used to determine forecasted sales for each menu item.

    I have tried using the =AVERAGEIFS function but cannot figure out how to get it to look at each individual sales entry and the corresponding date for only that column. Any help? Thanks.

    Jeff

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help With Conditional Averaging Based On Column Header...

    Try this...

    Data Range
    A
    B
    C
    D
    E
    F
    G
    H
    1
    1/1/2014
    1/2/2014
    1/3/2014
    1/4/2014
    1/5/2014
    1/6/2014
    1/7/2014
    2
    Item1
    2
    7
    4
    5
    27
    3
    Item2
    2
    2
    3
    8
    4
    Item3
    17
    21
    8
    5
    6
    Item1
    Tue
    12
    7
    Wed
    8
    Thu


    Note that the days of the week criteria are in a specific format: ddd.

    This array formula** entered in C6:

    =AVERAGE(IF(ISNUMBER(MATCH(TEXT(B1:H1,"ddd"),B6:B8,0)),IF(A2:A4=A6,IF(B2:H4<>"",B2:H4))))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    I'll be offline the rest of the night watching the Pens - Caps game!
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. Dynamic averaging based on adjacent column.
    By projectatpel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-20-2013, 02:21 PM
  2. Replies: 14
    Last Post: 08-05-2013, 04:36 AM
  3. [SOLVED] Averaging a column based on boundaries set at a different column
    By Kybynn in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-11-2013, 10:39 AM
  4. Averaging based on different Column
    By corky1111 in forum Excel General
    Replies: 5
    Last Post: 08-12-2011, 02:12 PM
  5. When Averaging a column, exclude value based on another cell value
    By Divercem in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-21-2006, 06:40 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