+ Reply to Thread
Results 1 to 10 of 10

Two criteria and one average

  1. #1
    Registered User
    Join Date
    02-22-2019
    Location
    Norway
    MS-Off Ver
    Student/Homeoffice 2016
    Posts
    14

    Two criteria and one average

    I want a column of days (Aker BP Data'!B$2:B$1044) (Mon, Tue, Wed etc...) and be able to filter the specific day "*Mon*" first, and then get the average % of another column (Aker BP Data'!I$2:I$1044,")

    This is the code I used for some other statistics, but can it be altered with some simple re-coding?

    =COUNTIFS('Aker BP Data'!B$2:B$1044,"*Mon*",'Aker BP Data'!I$2:I$1044,">"&B13)

    Thank you!
    Last edited by Jamal D; 02-24-2019 at 06:20 AM. Reason: Headline changed after I got my thoughts together

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: One criteria and one average

    Please note that this is NOT coding - this is a formula.

    Will you please attach a sample Excel workbook?

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-22-2019
    Location
    Norway
    MS-Off Ver
    Student/Homeoffice 2016
    Posts
    14

    Re: One criteria and one average

    Alright, I am trying to sort my thoughts here and slowly put the right words on it

    This is what I would like to extract averages from:

    I have written this into the document: I want to know the average % gains of a range (I2:1044) for each Mon,Tues,Wed (B2:B1044) etc. if bigger than Ref Cell (N:13)

    See attachment.
    Attached Files Attached Files

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: One criteria and one average

    Please try at N2 and drag down

    =AVERAGEIFS($I:$I,$I:$I,">"&$N$13,$B:$B,$M2)

  5. #5
    Registered User
    Join Date
    02-22-2019
    Location
    Norway
    MS-Off Ver
    Student/Homeoffice 2016
    Posts
    14

    Re: One criteria and one average

    I don`t think I managed to explain my question well enough...

    I want to know the Average "Mon" in the "Day-Range" (B2:B29) if bigger than N:13.

    My reference to N:13 is done because I can easily change to +1% or more.

  6. #6
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Two criteria and one average

    I don't understand clearly. It mean you want to add criteria date also i.e. 17-01-2019
    If this is correct then try in "N2"
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    "L2" is date criteria which is 17-01-2019


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  7. #7
    Registered User
    Join Date
    02-22-2019
    Location
    Norway
    MS-Off Ver
    Student/Homeoffice 2016
    Posts
    14

    Re: Two criteria and one average

    In column B I have 5 trading days ranging from Monday-Friday.
    I want to see the average of all Mondays IF they are bigger than then value in N:13.

    I really don`t see another way of putting this.

    PS. The dates are not important. I want stats extracted from a specific weekday.

  8. #8
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Two criteria and one average

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

  9. #9
    Registered User
    Join Date
    02-22-2019
    Location
    Norway
    MS-Off Ver
    Student/Homeoffice 2016
    Posts
    14

    Re: Two criteria and one average

    Thank you for trying to help me

    I will upload the excel sheet again and you will see that the averages does not come out right just yet.

    I also added some explanation. Sorry, I am a knucklehead about Excel for now, but I already learned a lot the last 2 days so bear with me
    Attached Files Attached Files

  10. #10
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Two criteria and one average

    @Jamal D

    the calculations in N2:O2 are correct, your manual calculations are not.

    there are 4 "Mon" values > 0 which total 13 hence avg of 3.25
    there is 1 "Mon" value < 0 which totals -4 hence avg of -4

    your manual errors relate to rows 6, 25 & 26.

+ 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. Average based on criteria and multiple criteria
    By batchjb69 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-05-2016, 04:30 AM
  2. [SOLVED] Sort by largest, 2nd criteria by less than average %, 3rd criteria pre defined heading.
    By deanusa in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-01-2015, 12:27 PM
  3. [SOLVED] Average using 2 > and < criteria
    By lemans96 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-13-2013, 02:42 PM
  4. [SOLVED] Average with More Than One Criteria
    By Hudas in forum Excel General
    Replies: 8
    Last Post: 04-06-2012, 02:47 PM
  5. Replies: 5
    Last Post: 05-05-2010, 10:32 AM
  6. Average with a criteria?
    By a94andwi in forum Excel General
    Replies: 3
    Last Post: 11-26-2007, 09:48 AM
  7. [SOLVED] Average given criteria, HELP!
    By Nebbez in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-04-2005, 03:20 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