+ Reply to Thread
Results 1 to 9 of 9

Macro coding to count

  1. #1
    Registered User
    Join Date
    11-17-2010
    Location
    India
    MS-Off Ver
    Microsoft Office Excel 2003
    Posts
    83

    Macro coding to count

    Friends,

    I need ur help, I need a macro coding for the below case:

    In worksheet2 i have named the column A as Completed date. In which i have entered many dates like 22 Nov 2010,23 NOV 2010.....01 DEC 2010,02 Dec 2010...etc

    In worksheet1 i have created a table with two columns say month and Completed.
    Now i need a macro coding that should work in a way that it should count how many dates has been entered in worksheet2 for the month of november and how many in the month of december.

    The final result in worksheet1 should be:

    For ex:

    Month Completed
    Nov 5
    Dec 9
    Last edited by Saky; 12-03-2010 at 12:02 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro coding to count

    why would you need a macro? What's wrong with a PivotTable or COUNTIF
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    11-17-2010
    Location
    India
    MS-Off Ver
    Microsoft Office Excel 2003
    Posts
    83

    Re: Macro coding to count

    Yeah tat's fine...But can you help me to do countif.

  4. #4
    Registered User
    Join Date
    11-17-2010
    Location
    India
    MS-Off Ver
    Microsoft Office Excel 2003
    Posts
    83

    Re: Macro coding to count

    Friends can any one help me on this..Kindly help me how to use the countif function for the above scenario.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro coding to count

    Read COUNTIF

  6. #6
    Registered User
    Join Date
    11-17-2010
    Location
    India
    MS-Off Ver
    Microsoft Office Excel 2003
    Posts
    83

    Re: Macro coding to count

    Roy, Thanks for the article..Now i understood the countif function....but in my excel i am entering dates...So how do i need to mention the criteria in Countif function. Can you help me...

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro coding to count

    I think a pivottable would be best, you need to attach an example workbook

  8. #8
    Registered User
    Join Date
    11-17-2010
    Location
    India
    MS-Off Ver
    Microsoft Office Excel 2003
    Posts
    83

    Re: Macro coding to count

    Quote Originally Posted by royUK View Post
    I think a pivottable would be best, you need to attach an example workbook
    Roy, thanks for your quick reply and assistnace.. I have attached my excel.

    If you go to sheet2 i have entered the dates in the columns like start date ,target date and completion date.

    i need a macro or countif function which should read the status first,

    if the status is "WIP" then it should read the target date and if the target date falls on november month then it should reflect the count as 1 against november month under WIP column in worksheet1.

    And if the status is "overdue" then as said above it should read the target date and should show the count under Overdue column in sheet1 in monthly basis.

    If the status is "completed" then it should read the completion date and if the completion date falls on november month then it should reflect the count as 1 against november month under Completed column in worksheet1.

    If the status is "Not started" then it should read the Start day column and should check the month it falls and according to it it should reflect the count in sheet1 under Not started column.

    Kindly help me...
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    11-17-2010
    Location
    India
    MS-Off Ver
    Microsoft Office Excel 2003
    Posts
    83

    Re: Macro coding to count

    Friends, can any one help me to solve the above case using macros.

    Thanks for your help in advance...

+ 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