+ Reply to Thread
Results 1 to 9 of 9

Progressive Sum Based on Variable.

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-29-2008
    Location
    Grand Rapids, MI
    MS-Off Ver
    Office 2010
    Posts
    127

    Progressive Sum Based on Variable.

    ok, this may be the same answer as the previous post i did, but if so, i can't figure that part out.

    In O2, if M2 = 8, and N2 = 2008, then add O3 + 8 rows (O3:O10)

    or, if M2 = 5, and N2 = 2009 then add O16 + 5 rows (O16:O20).

    I'm ready for a simple solution that I don't understand, lol.
    Attached Files Attached Files
    Last edited by robert_shindorf; 01-26-2009 at 05:58 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    Try,
    =IF(AND(M2=8,N2=2008),SUM(O3:O10),IF(AND(M2=5,N2=2009),SUM(O16:O20),""))

  3. #3
    Forum Contributor
    Join Date
    06-29-2008
    Location
    Grand Rapids, MI
    MS-Off Ver
    Office 2010
    Posts
    127
    oops, i don't think i explained it properly...

    ok, m2 will vary, it's linked to a different worksheet.... and dependent on it's value, depends on the number of rows needed. (if it's a 3, 3 rows, it it's a 9, 9 rows).

    if it's 2008 in n2, then start counting the rows at o3, if it's 2009, then start at o16.

    does that make more sense... it's a little harder than that dave! but, you did solve what i said!

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    Not that I'm a fan of OFFSET given it's volatility but here it might be quite useful:

    =SUM(OFFSET($O$3,12*($N$2-2008),0,$M$2,1))

  5. #5
    Forum Contributor
    Join Date
    06-29-2008
    Location
    Grand Rapids, MI
    MS-Off Ver
    Office 2010
    Posts
    127
    hmmm... that didn't seem to work... i'm not too familiar with the offset function either, i copied and pasted it, directly into cell O2.

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    change the 12* to 13*

    Post a sample of your file if the above does not resolve the issue.

+ 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