+ Reply to Thread
Results 1 to 12 of 12

Averaging and using a vlookup

  1. #1
    Registered User
    Join Date
    07-12-2019
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 365
    Posts
    6

    Averaging and using a vlookup

    This is a very complicated problem (or at least it is to me).

    I would like to find the average of some data that is listed horizontally, based on a vlookup up. I've screenshotted the data:

    Capture.JPG

    Help!

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Averaging and using a vlookup

    Workbook not included, but I'd use MATCH (instead of VLOOKUP) to get the 'row' of the data, and then either INDEX or OFFSET. to get the correct range for your AVERAGE.
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Registered User
    Join Date
    07-12-2019
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 365
    Posts
    6

    Re: Averaging and using a vlookup

    Quote Originally Posted by Pauleyb View Post
    Workbook not included, but I'd use MATCH (instead of VLOOKUP) to get the 'row' of the data, and then either INDEX or OFFSET. to get the correct range for your AVERAGE.
    Thanks Pauley! The problem is that the data columns differ per line. I tried attaching an image to show what I mean in the original post. Let me know if you can see what I mean.

    Thanks!

    Capture.JPG
    Last edited by chines1025; 07-15-2019 at 04:21 PM.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Averaging and using a vlookup

    Hello chines1025. Welcome to the forum.

    Please upload a representative sample Excel workbook directly to this forum.

    Here's how:

    To attach a file to your post: (Please no pics or screenshots ... saves retyping data.),

    be sure to desensitize the data
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”

    The file name will appear at the bottom of your reply.
    Dave

  5. #5
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Averaging and using a vlookup

    I can see your pic, but don't understand that the data columns differ by line. Do you mean that, for example, the row you have the box around you want to average from WK43 to WK03, and then the row underneath is WK43 to WK02, and the next is WK43 to WK04? AVERAGE will ignore blank cells in its calculation, so you could just have it average out from WK43 to WKxx. The differing sizes shouldn't matter.

  6. #6
    Registered User
    Join Date
    07-12-2019
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 365
    Posts
    6

    Re: Averaging and using a vlookup

    Sorry I'm not being clear. This is kind of hard to explain, but essentially I'm trying to find the average of just the data shown for the reference number highlighted. But for some of the other instances that data might shift a row or two.

    Usually, I would use the =AVERAGE() formula to average an item selling (the item is the ACADIA LOGO TEE) from Wkx to Wkxx based on a week count. For example, 12 weeks. However, as you can imagine, if I'm doing this for 30 different items, typing in that AVERAGE formula can be tedious as each item doesn't sell during the same weeks. So I've been having to adjust the weeks per line.

    What I'd like to do is just be able to enter the style name on a cover page and have the Average pull in automatically based on a CONCATENATE of the style name, color, and the other row details just pulling 12 weeks of visible data for that style.

    Does that help? I'm sorry if it's a mess. I've tried the MATCH but I still need to add AVERAGE and COUNT 12 or something to make it specific.

    Thanks for your patience and help!
    Attached Files Attached Files

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Averaging and using a vlookup

    For example, 12 weeks. However, as you can imagine, if I'm doing this for 30 different items, typing in that AVERAGE formula can be tedious as each item doesn't sell during the same weeks. So I've been having to adjust the weeks per line.

    What I'd like to do is just be able to enter the style name on a cover page and have the Average pull in automatically based on a CONCATENATE of the style name, color, and the other row details just pulling 12 weeks of visible data for that style.

    Yes imagining all that is tedious.

    So please upload another workbook with those details laid out the way you envision. It will give us something concrete to work with.

    Thank you.

  8. #8
    Registered User
    Join Date
    07-12-2019
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 365
    Posts
    6

    Re: Averaging and using a vlookup

    Thank you! I attached a simple version of what I'm working on. The cover tab shows how I'd like the file to look with some notes for reference. The data tab shows exactly how the report is pulled from our data system. I highlighted the "APS" row that shows the data I need.
    Attached Files Attached Files

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Averaging and using a vlookup

    Thank you for that upload. That is much clearer.

    To return the concatenated row headers, styles and colors from 'DATA' for all the code "APS" (or what ever is designated in D3) find entered in A4 filled down and across column C until you get blanks
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Then to return the averages in D4 filled down until you get blanks.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    07-12-2019
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 365
    Posts
    6

    Re: Averaging and using a vlookup

    Omg this worked! Thank you so so much! Quick question, is there a way to only use 12 cells of data in the APS row for the average, skipping the first cell of data versus averaging the whole row? This isn't completely necessary but I just wanted to check.

    So for example, this is a full row of selling:

    0.54 1.13 1.61 2.54 2.45 1.8 1.98 2.81 1.7 1.13 1.02 0.95 1.08 0.98 0.95 0.63 1.19 1 6.76 2.34

    But I only want to average what's in bold red and underlined. Usually the count is 12 but I would like to maybe add a count column that this formula you created looks to to know how many cells to use for the average. I added the column for this and reattached.

    Thanks again!
    Attached Files Attached Files

  11. #11
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Averaging and using a vlookup

    Quick question, is there a way to only use 12 cells of data in the APS row for the average, skipping the first cell of data versus averaging the whole row?
    Short answer is "Yes".

    Long answer is "It depends ... (which 12 values; always the same 12 values; always contiguous 12 values ...)"

  12. #12
    Registered User
    Join Date
    07-12-2019
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 365
    Posts
    6

    Re: Averaging and using a vlookup

    Hi

    It wouldn't always be 12, sometimes it would be 8 or 10. So I added a column that says how many to count in the average. It would be 12 consecutive cells starting after the first visible data cell.

    Is there a function that I could add to the formula you created? I tried "LOOKUP" and "COUNT" but obviously that was foolish haha.

    Thanks for your help!

+ 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. [SOLVED] averaging Vlookup
    By jrtaylor in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-18-2018, 11:55 PM
  2. [SOLVED] Ignore errors when averaging multiple VLOOKUP's
    By tool_fairy in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 07-22-2016, 07:21 AM
  3. [SOLVED] Complex VLOOKUP of multiple records, adding results, and averaging them by record count
    By Aimee S. in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-10-2015, 10:12 AM
  4. [SOLVED] Averaging Specific VLookup Values
    By kujoking7 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-13-2015, 05:29 PM
  5. [SOLVED] using Vlookup with multiple results and averaging the results.
    By xatomicx in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-12-2015, 10:19 AM
  6. Complicated averaging-- averaging data that matches certain intervals
    By atung in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 10-22-2014, 04:19 PM
  7. Averaging.
    By astrosoup in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-31-2007, 07:51 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