+ Reply to Thread
Results 1 to 9 of 9

Average + vlookup?

  1. #1
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Average + vlookup?

    Hi gurus!

    After searching on net I found some ugly formulas to average numbers (excluding blanks and zeros) combined with VLOOKUP. Actually my needs are bit complicated as I have 3 criteria to be looked at:
    • Product
    • Date
    • Average last seven days from today

    Is it possible at all? I am sure someone will come up with bright ideas. See dummy...

    Thanks a ton guys!
    Attached Files Attached Files
    Last edited by ABSTRAKTUS; 06-21-2011 at 05:07 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Average + vlookup?

    Hi Abstraktus,

    Do you want the average of the last seven days from Today, or from the date in cell G2? Also, based on your criteria, what would you expect the answers to be for Products 7, 2, 13 and 1 in your example?

  3. #3
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Average + vlookup?

    Also, please can you confirm that you explicitly need zeros to be excluded from the average. I ask because there are no zeros in your example data.
    Hope that helps,

    Colin

    RAD Excel Blog

  4. #4
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Re: Average + vlookup?

    Hi Paul and thanks for a quick reply.

    The formula should give me average of the last seven days from the date G2. And the answers I expect for those products should be average in period 14 june between 20 june.

  5. #5
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Re: Average + vlookup?

    Yes, there are lots of zeros in the orginal workbook. These to be excluded.

  6. #6
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Average + vlookup?

    Here's one way. This formula in C7 and then copied down:
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Re: Average + vlookup?

    forgot to mention that formula needs to be compatible with XL 2003.

  8. #8
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Average + vlookup?

    Try this array formula. CTRL+SHIFT+ENTER, not just ENTER.
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Re: Average + vlookup?

    Thanks. Exactly what I want. Spot on!

+ 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