+ Reply to Thread
Results 1 to 8 of 8

Sum based on typed Month

  1. #1
    Registered User
    Join Date
    03-16-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2010
    Posts
    26

    Question Sum based on typed Month

    Hi,

    I need help. I am preparing an Income statement, which contains number of month written in a row and in the row below I will write the income in those month. In the end of the the 12 months there is a total of all those months. So for example the rows looks like this:

    Row 1: Jan, Feb, March, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec, Total
    Row 2: 100, 100, 100 , 100,100, 100,100, 50, 100, 100, 100, 100 1150

    I need some formula that lets say that I write the text: Jun, so the total row sums from Jan until Jun. If I change the text to Aug so the total takes the sum of Jan until August.

    I have also put the attachment, I need the formula in the in cell O10 titled "YTD Budget 2016"


    Please advise on this and I shall be very grateful.

    Thanks
    Assad

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Sum based on typed Month

    There is no attachment.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Note that the Paperclip icon does not work.

    Pete

  3. #3
    Registered User
    Join Date
    03-16-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2010
    Posts
    26

    Re: Sum based on typed Month

    Sorry I was not aware that attachment didnt get uploaded.

    I have attached here.

    Thanks
    Attached Files Attached Files

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Sum based on typed Month

    Suppose you use cell O6 to specify the month you want to count up to. You should apply a custom format to this cell of "mmm" so that it only displays the month, but you should enter a proper date into the cell which is the first of the month that you are interested in, e.g. 1/06/2016 for June.

    Then you can have this formula in cell O10:

    =SUM($C10:INDEX($C10:$N10,MATCH($O$6,$C9:$N9,0)))

    which will sum from C10 up to the column whose month you have in O6.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    03-16-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2010
    Posts
    26

    Re: Sum based on typed Month

    Thank you sooooooooooo much!!!

    I spent months looking here and there and asking people about it but couldnt get it!! People told me so much complex formulas.

    This is so simple and it works efficiently!

    Will forever be grateful!

    Thanks!

  6. #6
    Registered User
    Join Date
    03-16-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2010
    Posts
    26

    Re: Sum based on typed Month

    Thank you sooooooooooo much!!!

    I spent months looking here and there and asking people about it but couldnt get it!! People told me so much complex formulas.

    This is so simple and it works efficiently!

    Will forever be grateful!

    Thanks!

  7. #7
    Registered User
    Join Date
    03-16-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2010
    Posts
    26

    Re: Sum based on typed Month

    Quote Originally Posted by Pete_UK View Post
    Suppose you use cell O6 to specify the month you want to count up to. You should apply a custom format to this cell of "mmm" so that it only displays the month, but you should enter a proper date into the cell which is the first of the month that you are interested in, e.g. 1/06/2016 for June.

    Then you can have this formula in cell O10:

    =SUM($C10:INDEX($C10:$N10,MATCH($O$6,$C9:$N9,0)))

    which will sum from C10 up to the column whose month you have in O6.

    Hope this helps.

    Pete
    This is the simplest of all formulas for this purpose. It saved me 1 Day to do my monthly reporting!

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Sum based on typed Month

    You're welcome - glad to help. Thanks for the rep.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post and mark this thread as SOLVED.

    There are a number of different variations that you could use. For instance, if you just wanted to put the 3-letter variations of the month in O6, i.e. "Jan", "Feb", "Mar" etc. (without the quotes), then you could have this formula in O10 instead:

    =SUM($C10:INDEX($C10:$N10,MATCH(DATEVALUE(1&$O$6&2016),$C9:$N9,0)))

    That means less typing for you. Alternatively, you could just enter the month number in O6, formatted as General, such that 1 = January, 2 = February, and so on, then the formula in O10 could become:

    =SUM($C10:INDEX($C10:$N10,$O$6))

    which is probably the simplest formula.

    Hope this helps.

    Pete

+ 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] Sort table based on criteria typed in the sheet
    By brunces in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-22-2016, 10:22 PM
  2. [SOLVED] Determine work days in current month or next month based on day of the month
    By sbrnard in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-29-2014, 05:14 PM
  3. Insert Picture based on what is typed in Cell?
    By Mile029 in forum Excel General
    Replies: 1
    Last Post: 04-19-2013, 06:10 AM
  4. Replies: 2
    Last Post: 06-14-2012, 01:55 PM
  5. Replies: 9
    Last Post: 02-14-2011, 10:04 PM
  6. VBA Output based on what's typed into Cell.
    By samhale in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-09-2008, 05:38 PM
  7. Coloring Cell based on typed information
    By Jonker19 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-19-2005, 09:50 AM

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