+ Reply to Thread
Results 1 to 3 of 3

Summing columns depending on date selected

  1. #1
    Registered User
    Join Date
    04-19-2010
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    86

    Summing columns depending on date selected

    Country Total Jun-12 Jul-12 Aug-12
    Australia 12 4 4 4

    Hi guys

    I have the above table in Excel, and I want to sum the month columns depending on which month I have selected in the report (always starting from the Jun-12 column), which go in the total column.

    So, in the total column, if I have Aug-12 selected in another cell, I want the total to sum Jun, Jul and Aug, but if I have Jul-12 selected, just sum the values in Jun and Jul.

    Is this possible?

    I have done a similar thing using match for ranges, but not sure how this is applied to normal forumlae?

    Thanks,
    John
    Last edited by john_london; 09-10-2012 at 09:56 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Summing columns depending on date selected

    Try:

    =SUM($B2:INDEX($B2:$Z2,MATCH($A$10,$B$1:$Z$1,0))

    where first row of values is in B2:Z2, with dates in B1:Z1, and the input date is in A10.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    04-19-2010
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Summing columns depending on date selected

    AWESOME, thanks!

+ 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