+ Reply to Thread
Results 1 to 7 of 7

Week over week Match-Index Help

  1. #1
    Registered User
    Join Date
    07-25-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    4

    Week over week Match-Index Help

    I need to have the Totals column in the % change for week over week automatically take the last two weeks when I insert a new week. I'm using the Index-Match w/ Max function. For ex, Row 5, I have the correct answers. Row 6 uses the index formula, which is computing incorrectly. I cannot find where it is wrong. Please help.

    The spreadsheet is attached. Thank you in advanced!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    05-04-2014
    Location
    New Jersey, United States
    MS-Off Ver
    Excel 2010, 2013
    Posts
    120

    Re: Week over week Match-Index Help

    My formula is in the gray cells. It should stay correct even when you insert new rows directly above it.

    WoW Percent Change Auto-Update 7-28.xlsx

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: Week over week Match-Index Help

    If you putthe calcs at the top, above your headings....
    A
    B
    C
    D
    E
    F
    1
    -68% -11% -51% 14% -44%
    2
    Week
    Clicks
    Impressions
    CTR
    Avg. CPC
    Total cost
    3
    6/1/2013
    1566
    382,118
    0.41%
    $ 0.52
    $ 818.02
    4
    6/8/2013
    641
    335,086
    0.19%
    $ 0.56
    $ 362.07
    5
    6/15/2013
    382
    302,496
    0.13%
    $ 0.66
    $ 252.08

    then you can use this in B1, copied across...
    =-INDEX(B$3:B$1000,MATCH(99^99,B$3:B$10000,1)-1)/INDEX(B$3:B$1000,MATCH(99^99,B$3:B$10000,1))+1
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    07-25-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    4

    Re: Week over week Match-Index Help

    Thanks for your inputs. That formula is still spitting out the wrong numbers though. For example, column B is supposed to be -40%, column C = -10%, column D = -34%, column E = 17%, column F = -30. I got those answers from the simple % change formula: (new-old)/old. What do you think the discrepancy is between the formula you used?

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Week over week Match-Index Help

    In B2 copied right (See attachment)

    =(INDEX(B$3:B$1000, MATCH(9^99,B$3:B$1000))-INDEX(B$3:B$1000, MATCH(9^99,B$3:B$1000)-1))/INDEX(B$3:B$1000, MATCH(9^99,B$3:B$1000)-1)

    I would use dynamic defined names instead of setting the large range. If you'd prefer to do it that way,

    http://www.contextures.com/xlNames01.html#Dynamic
    Any questions?
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  6. #6
    Registered User
    Join Date
    07-25-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    4

    Re: Week over week Match-Index Help

    Thanks! That's exactly it. Slightly confused though...in the match function-is the 9^99:B$1000 doing the same thing as the Max function does? And Dynamic Named ranges would work great. Which part would I make that?

    Thanks!

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Week over week Match-Index Help

    Yes, yours would have worked but you forgot a -7 in the denominator.

    For Dynamic named ranges, for example,
    Clicks = OFFSET($B$3,0,0, COUNT($B$3:$B$1000),1)
    then my formula becomes
    =(INDEX(Clicks, MATCH(9^99,Clicks))-INDEX(Clicks, MATCH(9^99,Clicks)-1))/INDEX(Clicks, MATCH(9^99,Clicks)-1)
    It makes formulas easier to read and write. The disadvantage is it wouldn't allow you to copy right.
    Impressions would be set as
    =OFFSET(Clicks,0,1)
    and so on.

+ 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. UserForm with that shows Previous Week Data and allows you to update current week
    By hicks1ch in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-22-2014, 09:47 AM
  2. [SOLVED] excel hlep to calculate the week no from dispatch to closed calls week wise
    By johnodys in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-05-2013, 04:53 AM
  3. How to: identify repeat offenders within a 3 week period (week per week basis)
    By Heloc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2012, 12:43 AM
  4. [SOLVED] Index - results in the last week/following week from 2 tabs
    By coreycolman in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-07-2012, 05:05 PM
  5. Replies: 2
    Last Post: 03-16-2012, 08:04 AM

Tags for this Thread

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