+ Reply to Thread
Results 1 to 8 of 8

Working with advanced filters...?

  1. #1
    Registered User
    Join Date
    03-06-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    59

    Working with advanced filters...?

    I created an advanced filter in my worksheet titled Shipping Data, and I am trying to create a function in B7 that will average the field listed in B6 for the ShipData_All (which is one of my name ranges) database but using the criteria range A3:J4.

    I haven't worked with filters as much and any help is appreciated.
    Attached Files Attached Files
    Last edited by BillJo; 03-28-2015 at 02:30 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Working with advanced filters...?

    I think you have your references all mixed up?
    B7 contains a SUM (not an average)
    B6 contains an average (not a field)
    A3:K4 are headings with only 1 entry (E4)

    From the sounds of it though, you probably need to look at the SUMIFs and AVERAGEIFs() functions
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    03-06-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    59

    Re: Working with advanced filters...?

    The reason why I have a SUM in B7 is because I wanted to create a function that would find the sum of the filtered data based upon the field name listed in B5 which is Qty. And the reason why I have an AVERAGE in B6 id I wanted to create a function that will find the average of the filtered data based upon the field again in B5 which is Qty. If that makes sense.

    So going back to my original question, I think I may have to average an average, but I don't know how to do this?
    Last edited by BillJo; 03-28-2015 at 12:41 PM.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Working with advanced filters...?

    For a start off, an average of an average is mathematically incorrect.

    you said you want to filter on QTY, but filter what? You have 100 entries, with an average of 267.5, a min of 75 and a max of 500. What do you want to filter on?

    Im sorry, but I totally do not understand what you want Perhaps if you gave some sample answers and explained how you got them?

  5. #5
    Registered User
    Join Date
    03-06-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    59

    Re: Working with advanced filters...?

    Ok so I set up a calculation on the filtered data based on one of three data fields in cell B5, in B6 I created a function that will find the average of the filtered data based on the field name listed in B5. In B7, I created a function that will find the sum of the filtered data based on the field name listed in B5.

    Since, on my Shipping Report sheet the database statistics need to either be created or corrected so I set up a criteria range starting in cell A3, in cell E4 I typed CA as a criterion for that State and now in B7 I want to create a function that will average the field listed in B6 for the ShipData_All database using the criteria range in A3:J4.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Working with advanced filters...?

    hmm ok, maybe this...
    =AVERAGE(INDIRECT(B5))

    Or, if you need to include additional criteria...
    =AVERAGEIFS(INDIRECT($B$5),State,$E$4)

  7. #7
    Registered User
    Join Date
    03-06-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    59

    Re: Working with advanced filters...?

    Thank you, but I just realized that I would have to create a function that will average the field listed in B6 for the ShipData_All database using the criteria range in A3:J4 in cell B7 in my worksheet titled Shipping Report. So do you think I can incorporate what you stated above into B7 in my worksheet Shipping Report?

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Working with advanced filters...?

    I have added 2 more tables to your sheet1 (with yellow hi-light) and moved yourtable to the right for comparison

    the 1st table is by State, with a Drop-down of available states. It pulls only those cities in that state. There is a tiny hiccup, it starts pulling into the 2nd row of the table, unless IL is selected, then it skips a row

    The 2nd table pulls all unique city names, but has no link to states. I could probably add this
    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)

Similar Threads

  1. Replies: 3
    Last Post: 07-25-2014, 03:43 AM
  2. Advanced Filters
    By Louise in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-28-2005, 07:05 AM
  3. [SOLVED] advanced filters
    By jiwolf in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-18-2005, 02:05 PM
  4. Advanced Filters
    By Louise in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-26-2005, 07:05 AM
  5. Advanced Filters
    By carlito_1985 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-29-2005, 02:40 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