+ Reply to Thread
Results 1 to 7 of 7

Sum of column by automatically choosing range of 1 year

  1. #1
    Registered User
    Join Date
    05-08-2013
    Location
    pune
    MS-Off Ver
    Excel 2007
    Posts
    4

    Sum of column by automatically choosing range of 1 year

    Hi
    I've a excel sheet in which first row consist of month names and rest of the rows contains numerical values. I've to update this every month by inserting a new column for next month.
    Now in last column i want put a summation formulae. I have to calculate sum of 1 year(for example if i'm adding a column say May-13,then i want sum of May-12 to May-13).Now to calculate this i've to everytime change the sum range manually.I want the range to shift and be limited to 1 year starting from the last newly inserted month.Can this be done by soome formulae or macro.Pls help

    I'm attaching sheet for reference.


    Regards

    Pavan Raj
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Sum of column by automatically choosing range of 1 year

    Try
    =((index(3:3,match(max($2:$2),$a$2:index($2:$2,count($2:$2)+2),0))-index(3:3,match(max($2:$2),$a$2:index($2:$2,count($2:$2)+2),0)-12))/100)/index(3:3,match(max($2:$2),$a$2:index($2:$2,count($2:$2)+2),0)-12) in yoy%
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Sum of column by automatically choosing range of 1 year

    Hi,

    This is another alternative, Paste the formula below "Sales" column and the drop down
    =SUM(INDIRECT(ADDRESS(ROW(),COLUMN($BE$2)-12)&":"&ADDRESS(ROW(),COLUMN($BE$2)-1)))
    Appreciate the help? CLICK *

  4. #4
    Registered User
    Join Date
    05-08-2013
    Location
    pune
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Sum of column by automatically choosing range of 1 year

    Quote Originally Posted by martindwilson View Post
    Try
    =((index(3:3,match(max($2:$2),$a$2:index($2:$2,count($2:$2)+2),0))-index(3:3,match(max($2:$2),$a$2:index($2:$2,count($2:$2)+2),0)-12))/100)/index(3:3,match(max($2:$2),$a$2:index($2:$2,count($2:$2)+2),0)-12) in yoy%
    thanks but its not working .If u can show it in the excel sheet i've attached then it will be helpful..

  5. #5
    Registered User
    Join Date
    05-08-2013
    Location
    pune
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Sum of column by automatically choosing range of 1 year

    Quote Originally Posted by AZ-XL View Post
    Hi,

    This is another alternative, Paste the formula below "Sales" column and the drop down
    =SUM(INDIRECT(ADDRESS(ROW(),COLUMN($BE$2)-12)&":"&ADDRESS(ROW(),COLUMN($BE$2)-1)))
    thanks but when iserting a new coloumn ...its not working

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Sum of column by automatically choosing range of 1 year

    oops i put / instead of * it should be
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and MoM
    would be
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by martindwilson; 05-09-2013 at 08:44 AM.

  7. #7
    Registered User
    Join Date
    05-08-2013
    Location
    pune
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Sum of column by automatically choosing range of 1 year

    thanks alot ...its working :-)

+ 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