+ Reply to Thread
Results 1 to 9 of 9

Average with More Than One Criteria

  1. #1
    Forum Contributor
    Join Date
    02-16-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    108

    Smile Average with More Than One Criteria

    Hello Everyone,

    Attached is sample spreadsheet, how would you average the transaction from January Week 2 to February Week 3, meaning transaction from January Week 2,January Week 3,January Week 4, January Week 5, February Week 1, February Week 2, February Week 3?

    Thank you very much!
    Hudas
    Attached Files Attached Files
    Last edited by Hudas; 04-06-2012 at 02:52 PM. Reason: Adjusted font for easier reading

  2. #2
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Average with More Than One Criteria

    you could use an array formula, something like this

    =AVERAGE(IF(A2:A16="January",IF(INT(RIGHT(B2:B16,1))>=2,C2:C16)),IF(A2:A16="February",IF(INT(RIGHT(B2:B16,1))<=3,C2:C16)))

    confirmed with Ctrl+Shift+Enter
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  3. #3
    Valued Forum Contributor
    Join Date
    03-14-2012
    Location
    Arizona USA
    MS-Off Ver
    Excel 2000/2007
    Posts
    408

    Re: Average with More Than One Criteria

    See attach modified workbook.

    It would be better to use real dates instead of Month and Week Number.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    02-16-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    108

    Re: Average with More Than One Criteria

    Hi DGagnon,

    It worked perfectly, one last question, what part of the formula I will change if I am to average the data from January Week 1 to February Week 4?

    Thank you!!
    Hudas
    Last edited by Paul; 04-06-2012 at 03:46 PM. Reason: Font edit

  5. #5
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Average with More Than One Criteria

    you would change the number that i have bolded

    =AVERAGE(IF(A2:A16="January",IF(INT(RIGHT(B2:B16,1))>=2,C2:C16)),IF(A2:A16="February",IF(INT(RIGHT(B 2:B16,1))<=3,C2:C16)))

    also note, if you span more than 2 months, you will need to add an additional if statement

  6. #6
    Forum Contributor
    Join Date
    02-16-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    108

    Re: Average with More Than One Criteria

    @Dennis7849 Thank you very much!! though I prefer the formula given by DGagnon because I'm gonna be using a dynamic range for this. Thanks anyway!!
    Last edited by Paul; 04-06-2012 at 03:47 PM. Reason: Font edit

  7. #7
    Forum Contributor
    Join Date
    02-16-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    108

    Re: Average with More Than One Criteria

    Thank you both of you!!
    Last edited by Paul; 04-06-2012 at 03:47 PM. Reason: Font edit

  8. #8
    Forum Contributor
    Join Date
    02-16-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    108

    Re: Average with More Than One Criteria

    Thank you both of you!! @DGagnon I can't give you +rep because it's giving me this "You must spread some Reputation around before giving it to DGagnon again."
    Last edited by Paul; 04-06-2012 at 03:47 PM.

  9. #9
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Average with More Than One Criteria

    no problem, im glad i could assist, I was probably the last person that you gave rep to, i dont think you can rep the same person 2 times in a row.

    On another note, i woudl recomend that for this exercise, if possible using real dates (eg the first date of the week) in an additional row you could do any sum or average based off of that in a more simple way.

+ 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