+ Reply to Thread
Results 1 to 17 of 17

[SOLVED]Count data monthly automatically

  1. #1
    Registered User
    Join Date
    11-26-2012
    Location
    germany
    MS-Off Ver
    Excel 2010
    Posts
    21

    [SOLVED]Count data monthly automatically

    Hey guys!

    I need your help, i need a formula that i can put in cells that can count datas automatically each month.
    The data that i have is huge and it updates everyday. As an example i will explain it simply.

    Lets say i have a list of product groups in column A. Column B is the date where the samples arrived, Column C is the approval, Column D is the sending date.

    I probably need to post a picture of the table:
    http://img845.imageshack.us/img845/8855/tableog.png

    sample workbook:
    Attachment 197668Attachment 197668



    So as you can see, i need to a formula to count the percentage of "approved samples", "not approved samples" and so on (for month december)

    The approved sample for month december should have these requirement: If the date of arrival is in December 2012, if the approval says "approved" and NOT EMPTY,if the date of sending is NOT EMPTY.. So from the table, the answer is 2.
    The percentage should be the 2, divided by all samples (Telephone) arrived with approval, doesnt matter if the date of sending is empty or not. (which is 4)

    I hope i didnt make it too confusing, and i would want a formula that can do this automatically monthly, so i dont need to do the formula time and again.
    and i really hope someone can help me, id appreciate it!
    Last edited by patehi; 12-06-2012 at 05:36 AM.

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Count data monthly automatically

    Attach a real sample workbook.

    When you are in Advanced reply, click on the paperclip to open the upload window.

    View Pic
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count data monthly automatically

    Hi to you.

    Very nice picture! , BUT:

    Can you work on a picture? Pls upload a small sample workbook.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Registered User
    Join Date
    11-26-2012
    Location
    germany
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Count data monthly automatically

    Hi Fotis!

    oh yes i forgot, sorry!

    table1.xlsxtable1.xlsx

    thanks!

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count data monthly automatically

    Maybe.

    =SUMPRODUCT((C2:C15<>"")*(D2:D15<>"")*(C2:C15="approved")*(MONTH(D2:D15)=12))

  6. #6
    Registered User
    Join Date
    11-26-2012
    Location
    germany
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Count data monthly automatically

    That formula looks good! but i forgot to mention, another criteria is that the percentage i want for each product, which means:

    1.Percentage of approved Telephone
    2.Percentage of approved Pen
    etc..

    And can i also use the whole column C:C or D:D? will the formula work as well?

    COuld you tell me what this formula do? (C2:C15<>"")

    it also seems that i have to change the formula *(MONTH(D2:D15)=12)) every month too. Is this the only possible way? or is there another alternative to it, so it does it automatically, taking account of today's date and month and link it to the formula?

    Sorry for asking so many questions, but i hope its not too troublesome!
    Last edited by patehi; 12-03-2012 at 04:36 AM.

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count data monthly automatically

    =SUMPRODUCT((C2:C15<>"")*(D2:D15<>"")*(C2:C15="approved")*(MONTH(D2:D15)=12)*(A2:A15="Telephone"))

    1) In Excel >=2007, you can use whole column range, but my opinion is to don't do this because the calculations will be slower.

    2) My suggestion is to use a validation list with products and use a cell reference in the formula.

  8. #8
    Registered User
    Join Date
    11-26-2012
    Location
    germany
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Count data monthly automatically

    Thanks! Now i understand how the formula works.
    But could you tell me how could i do it when i wanted to use the whole column range? i tried to play around the formula a little bit, and this looks like its working:

    =SUMPRODUCT((C:C<>"")*(D:D<>"")*(A:A="Telephone")*(C:C="approved"))

    but when i added month, its not working anymore. could you find out whats wrong with my formula?

    =SUMPRODUCT((C:C<>"")*(D:D<>"")*(A:A="Telephone")*(C:C="approved")*(MONTH(B:B)=12))

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count data monthly automatically

    Just now i work to a non strong pc.

    Trying to test what you asked, my pc blocked for more than 10 minutes.

    As i told my suggestion is to DON'T use whole column range.

    Use OR large ranges(as let's say A2:A15000) OR use dynamic ranges.

    http://www.contextures.com/xlNames01.html

  10. #10
    Registered User
    Join Date
    11-26-2012
    Location
    germany
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Count data monthly automatically

    hi Fotis!

    im sorry that your pC did that >.<
    Okay i tried your suggestion and it works nicely ^^

    thank you!

  11. #11
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count data monthly automatically

    Quote Originally Posted by patehi View Post
    hi Fotis!

    im sorry that your pC did that >.<
    Okay i tried your suggestion and it works nicely ^^

    thank you!
    Never mind!

    You are welcome.

  12. #12
    Registered User
    Join Date
    11-26-2012
    Location
    germany
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Count data monthly automatically

    hi again Fotis and everyone!

    i have another question, do you know how i can modify the formula so i can get datas in a range within a year?
    example, i want to get a data for month 4 to month 6. Or from month 1 to month 5.

    Thank you for your help!

  13. #13
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count data monthly automatically

    One way.

    =SUMPRODUCT((C2:C15<>"")*(D2:D15<>"")*(C2:C15="approved")*(MONTH(D2:D15)=4)*((MONTH(D2:D15)=5))*((MONTH(D2:D15)=6)*(A2:A15="Telephone"))

  14. #14
    Registered User
    Join Date
    11-26-2012
    Location
    germany
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Count data monthly automatically

    oh so theres no other way? if i wanted to count the data for month Jan to November, i have to add all the formula?

    i wanted to do this kind of table, where you can insert the month of your choice, and end of month of your choice. i will attach a sample book here:

    so that means, if you want a yearly data, you can just put month 1 and month 12.

    is there a function where you can play around with it?

    if not, its okay ^^
    Attached Files Attached Files

  15. #15
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count data monthly automatically

    As my IP is blocked, i am not able to send a sample. But try this.

    In A11 and copy until A37, put this.

    =MONTH(C11) Column A will be a helper and hidden if you like column.

    Then IN C5, put this

    =SUMPRODUCT(($B$11:$B$37=C$4)*($D$11:$D$37=$B5)*($A$11:$A$37>=$C$2)*($A$11:$A$37<=$E$2))

    Copy to C6,D5,D6.

  16. #16
    Registered User
    Join Date
    11-26-2012
    Location
    germany
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Count data monthly automatically

    wow this formula is genius! works like a charm!

    Thank you so much Fotis! ^^

  17. #17
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count data monthly automatically

    You are welcome.

    Thanks for the reb*

+ 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