Sum cells based on date criteria

  • Hi guys,


    my first post and I'm very new to Excel. please help.


    here's what I want to do;


    from my excel sheet, certain dates have values and I want to add them up and show them on calendar when I click on that date.


    I have the calendar added already but couldn't find a way to do that..


    for example;


    a1-10/20/2010 a2-1000
    b1-10/19/2010 b2-2000
    c1-10/20/2010 b3-1500


    so when I click on 10/20 from the calendar, I would like an output of 2500.


    is this something feasible?


    thanks in advance

  • Re: Sum cells based on date criteria


    zukbang,


    Welcome to Ozgrid.


    Thread titles are important for obtaining good search results and should be written with this thought in mind -- that is, the title should be "search friendly", meaning a search using YOUR title as the search terms will yield relevant results. Thread titles should concisley and accurately describe the content of your thread.


    Your title of "[COLOR="red"]Excel calendar help![/COLOR]" does not adequately describe your thread.
    Note the change in your title, based on your overall thread content, as an example when creating future threads.



    In order to accurately answer your question you need to post a sample workbook and manually show the expected result so that we can get an good understanding of how to sum the values by date.


    We need to know what kind of calendar you are using. Is this VBA calendar control, a worksheet developed to mimic a calendar, etc.

  • Re: Sum cells based on date criteria


    AAE, thanks first time doing this kinda work since college...been so long.


    i'm using calendar control 10.0 from excel.
    basically what I would like to do is, I want to find out how many units are coming in in certain date.
    I kinda explained on my first post....I hope this explains a little more of my question.


    Thanks

  • Re: Sum cells based on date criteria


    Have your clicked Calendar date entered into a Named cell that the SUMIF Function reads as its date criteria


    Code
    Private Sub Calendar1_Click()
        Range("SumDate") = Calendar1.Value
    End Sub


    =SUMIF($A$1:$A$20,SumDate,$B$1:$B$20)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!