+ Reply to Thread
Results 1 to 12 of 12

Thread: Index/Match formula to find average.

  1. #1
    Registered User
    Join Date
    02-12-2011
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2003/2007
    Posts
    17

    Index/Match formula to find average.

    Hi All

    I am after your expert advice please.

    I want to find out the average number of litres consumed by each driver over a period.

    Does anybody know how I can do this?

    Please see attached sample.

    Thanks for any help.
    Attached Files Attached Files

  2. #2
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,225

    Re: Index/Match formula to find average.

    =SUMIF/COUNTIF OR =AVERAGEIF, maybe?

    Or: =SUMPRODUCT

    Or: =SUMIFS/COUNTIFS or =AVERAGEIFS

    Depending on Excel version and the number of conditions.


    Regards
    Last edited by TMShucks; 11-17-2011 at 02:17 AM.

  3. #3
    Registered User
    Join Date
    02-12-2011
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2003/2007
    Posts
    17

    Re: Index/Match formula to find average.

    Thanks TM, I have very basic Excel knowledge, do you know how I would use this in my spreadsheet, I am guessing with a Match formula?

  4. #4
    Forum Moderator Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    5,953

    Re: Index/Match formula to find average.

    In cell D1 type "Start Date". In D3 type "End Date". Fill in D2 and D4 with valid dates.

    Convert your text "dates" in column A to actual dates. To do so, in E9 use this formula (assumes dd/mm/yy):

    =DATEVALUE(LEFT(A9,2)&"/"&MID(A9,4,2)&"/"&RIGHT(A9,2))

    Fill that down to E39 (or your last used row). Copy E9:E39. Right-click on A9 and choose PasteSpecial > Values. Delete E9:E39.

    Now in B2, to get Chris' average, use:

    =AVERAGEIFS($D$9:$D$39,$A$9:$A$39,">="&$D$2,$A$9:$A$39,"<="&$D$4,$B$9:$B$39,A2)

    Fill that down as many rows as you have people listed.

    Good luck!

  5. #5
    Registered User
    Join Date
    02-12-2011
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2003/2007
    Posts
    17

    Re: Index/Match formula to find average.

    Hi All

    Thanks for all your replies.

    However I am still have issues with this.

    I have updated my sample to show a bit more detail.

    Basically, I need a formula to establish MPG average by driver, I say basically, but I am really stuck here.

    Any help would be kindly received as always.
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,297

    Re: Index/Match formula to find average.

    Ηι

    One possible solution to the issue you will find the attached file.

    It's what you're looking for?
    Attached Files Attached Files
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

  7. #7
    Registered User
    Join Date
    02-12-2011
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2003/2007
    Posts
    17

    Re: Index/Match formula to find average.

    Thanks Fotis.

    That is as close as I have come, but because the count includeds '0' values of MPG the MPG average is incorrect, I need the zero quantinies to be omitted from the count.

    Do you have any other idea's?

    Thanks again for your help.

  8. #8
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,297

    Re: Index/Match formula to find average.

    ΗΙ again.

    Ok, I will look back.
    Of course, I think you know that using the AutoFilter and Subtotal, easily find your challenge!
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

  9. #9
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,297

    Re: Index/Match formula to find average.

    Hi

    Take a look to the new one.

    Is it ok now?
    Attached Files Attached Files
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

  10. #10
    Registered User
    Join Date
    02-12-2011
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2003/2007
    Posts
    17

    Re: Index/Match formula to find average.

    Hi Fotis

    Thanks looks to have done the trick.

    Thanks a lot!!!!!

  11. #11
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,297

    Re: Index/Match formula to find average.

    Hi.

    Glad that helped.

    If you found the solution to your issue, then please,mark the topic as solved.
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

  12. #12
    Forum Moderator Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    5,953

    Re: Index/Match formula to find average.

    Since the dates dont appear to matter, you can simply use AVERAGEIFS (Excel 2007+) without needing any helper columns.

    Assuming your data is laid out as in Fotis' last uploaded file, in C2 use:

    =AVERAGEIFS($E$10:$E$67,$B$10:$B$67,$B2,$E$10:$E$67,">0")

    Fill that down to C6. No need for columns F, G and H. If you're using Excel 2003 or earlier, other formulas will suffice since AVERAGEIFS does not exist there.

    Either this non-array version:

    =SUMPRODUCT(--($B$10:$B$67=$B2),--($E$10:$E$67>0),$E$10:$E$67)/SUMPRODUCT(--($B$10:$B$67=$B2),--($E$10:$E$67>0))

    Or this array version, confirmed with CTRL+SHIFT+ENTER (not just ENTER):

    =AVERAGE(IF(($B$10:$B$67=$B2)*($E$10:$E$67>0),$E$10:$E$67))

    Hope that helps!

+ 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.2.0