+ Reply to Thread
Results 1 to 18 of 18

Criteria Based Monthly Counts

  1. #1
    Registered User
    Join Date
    05-29-2013
    Location
    MIE
    MS-Off Ver
    Excel 2007
    Posts
    94

    Criteria Based Monthly Counts

    Request some help to customize the attached script to count the number of live “BUYER’s” during a months period.

    I need the flexibility to select the Month and Year from the calendar controls and using the data set in Tab labeled “Data” determine this….

    How many TOTAL buyers by Category (Column C) were alive during the selected Month?
    How many UNIQUE buyers by Category (Column C) were alive during a specific Month?

    Example if I want to know the number of BUYERs alive in March 2013 then:

    Commencement date in Column D of the Data Tab should not be after March 31, 2013, but it can be anytime earlier than it, AND
    Closure date in Column E of the Data Tab should not be before March 1, 2013, but it can be anytime on or after this date

    Have manually extracted the data and created a tab labeled as March. You’ll notice that all these entries comply with the above logics. The counts are then populated against each category

    Similar calculation need to be run on the month selection made in Calendar Control E

    Columns F and G – Compares whether a BUYER who was alive in the Month and Year selected in Calendar Control C is also ALIVE in the comparison Month and Year selected through Calendar Control G or not, if yes it gives the counts.

    Basically, I need to move the script from data specific calculations to count for the complete Month…..

    Thanks in advance!

    ______________________________________________________________________________________________________________________________________________________________

    What the script does currently?

    On making a selection of a specific date from the Calendar controls from columns C, E and G. It gives me a count of the Total PURCHASERS after complying of the following 2 logics:

    Periodic Counts – Column B

    Total Buyers who had Commencement date on or before a certain date basis date in Column D of Data Tab
    Total Buyers who had Closure date on or after a certain date basis date in Column E of Data Tab

    Periodic Counts – Column C

    Unique Buyers who had Commencement date on or before a certain date basis date in Column D of Data Tab
    Unique Buyers who had Closure date on or after a certain date basis date in Column E of Data Tab

    The above calculation are run for columns D and E as well.

    Columns F and G – This segment compares whether a BUYER who was alive on the date selected in Calendar Control C is also ALIVE on the comparison date selected through Calendar Control G or not, if yes it gives the counts.
    Attached Files Attached Files
    Last edited by simplyxl; 08-13-2013 at 09:56 AM.

  2. #2
    Registered User
    Join Date
    05-29-2013
    Location
    MIE
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Criteria Based Monthly Counts

    Please help and guide me.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Criteria Based Monthly Counts

    Hi simplyxl

    Please post a workbook with results for each Column completed and illustrate how you got those results. Is this Code intended to be EITHER Select Month and Year OR Select Periodic Counts?
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Registered User
    Join Date
    05-29-2013
    Location
    MIE
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Criteria Based Monthly Counts

    Dear John,

    Thank you for your response! I apologize for the delayed response was stuck on calls with no internet access.

    I am requesting your help to be able to select Month and Year through calendar control to get the by category Monthly Periodic Counts.

    As suggested, I've attached a sheet (non macro) with the following:

    Periodic Monthly Counts - This gives the expected results on which I am seeking your help
    Raw Data - It is the sample dummy data used for illustration sake

    I have used the months Jan 2013 and Mar 2013 as the examples.

    For illustration, I have manually extracted the data and drawn pivots to get the counts that need to be appended in tab 1 named Periodic Monthly Counts.

    Please let me know if you have any questions.

    Thanks a lot!
    Attached Files Attached Files

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Criteria Based Monthly Counts

    Hi simplyxl

    What about this question
    Is this Code intended to be EITHER Select Month and Year OR Select Periodic Counts?
    Or is this an entirely NEW Workbook?

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Criteria Based Monthly Counts

    Hi simplyxl

    I've a question regarding your "Illustration of the request.xlsx"...you have the same Date in Cells C3 and G3...is this correct?

    Question.jpg

  7. #7
    Registered User
    Join Date
    05-29-2013
    Location
    MIE
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Criteria Based Monthly Counts

    Quote Originally Posted by jaslake View Post
    Hi simplyxl

    What about this questionOr is this an entirely NEW Workbook?
    Hi John,

    I have to get the counts by month. The request is to be able to select the month and year from the calendar controls to get periodic counts. Does this make sense?

    Please let me know if it doesn't. I'll try to calrify it further.

  8. #8
    Registered User
    Join Date
    05-29-2013
    Location
    MIE
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Criteria Based Monthly Counts

    Quote Originally Posted by jaslake View Post
    Hi simplyxl

    I've a question regarding your "Illustration of the request.xlsx"...you have the same Date in Cells C3 and G3...is this correct?

    Attachment 257919

    Please let me take another look. I'll get back to you with the answer shortly.

    Thank you for bringing this to my attention. I'm mobile so will run it again once I get home.

    Thanks a zillion.

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Criteria Based Monthly Counts

    Hi simplyxl

    It makes sense but it doesn't answer my question. I'll ask again...

    You have existing Code that gives you results based on specific dates in Cells C3, E3 and G3. That Code appears to work as required. DO YOU WISH TO KEEP THAT CAPABILITY? Or are we REPLACING that Code to give you this capability
    to select Month and Year through calendar control to get the by category Monthly Periodic Counts

  10. #10
    Registered User
    Join Date
    05-29-2013
    Location
    MIE
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Criteria Based Monthly Counts

    EXactly! In this I need to select Month and Year through calendar control to get the by category Monthly Periodic Counts.

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Criteria Based Monthly Counts

    Hi simplyxl

    We're REPLACING the Code...Yes or No?

  12. #12
    Registered User
    Join Date
    05-29-2013
    Location
    MIE
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Criteria Based Monthly Counts

    Yes sir...

  13. #13
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Criteria Based Monthly Counts

    Thank you...I have Columns B, C, D and E resolved...have not yet resolved Columns F and G. Please check you Sample File "Illustration of the request.xlsx" to make certain YOUR results are accurate.

  14. #14
    Registered User
    Join Date
    05-29-2013
    Location
    MIE
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Criteria Based Monthly Counts

    Thank you, thank you......

    I'll surely look through it again, and get back to you shortly.

    You are the best and thanks for your paitence.

  15. #15
    Registered User
    Join Date
    05-29-2013
    Location
    MIE
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Criteria Based Monthly Counts

    Quote Originally Posted by jaslake View Post
    Hi simplyxl

    I've a question regarding your "Illustration of the request.xlsx"...you have the same Date in Cells C3 and G3...is this correct?

    Attachment 257919
    Thanks John.

    You were right! I had inadvertently pasted the wrong month name in the last version. It should have been March – 2013 as I was comparing it Vs. Jan – 2013. I also notice a minor error for calculation in F and G. It has been updated in the attached.

    Really thankful for your assistance.

    Kind regards,
    Simplyxl
    Attached Files Attached Files

  16. #16
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Criteria Based Monthly Counts

    Hi simplyxl

    Try the Code in the attached...it appears to do as you require...let me know of issues.
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    05-29-2013
    Location
    MIE
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Criteria Based Monthly Counts

    Yahoo! Thanks a lot sir.

    I'll try it and get back to you shortly.

    You have a blessed day and time ahead.

    It (this help) means a lot to me

  18. #18
    Registered User
    Join Date
    05-29-2013
    Location
    MIE
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Criteria Based Monthly Counts

    Quote Originally Posted by jaslake View Post
    Hi simplyxl

    Try the Code in the attached...it appears to do as you require...let me know of issues.
    Absolutely phenomenal!!!

    Thank you very very much sir.

    Regards,
    Simplyxl

+ 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] 3 issues hindering CSV File Creation - Modification Help Request
    By Ilikeideas in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-25-2013, 11:42 AM
  2. Replies: 0
    Last Post: 05-15-2013, 07:12 AM
  3. Help with Conditional script modification
    By Rabbitstew in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2013, 03:36 PM
  4. [SOLVED] Slight Modification Request VBA Code - Text File to Excel
    By spiwere in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 03-22-2013, 04:39 AM
  5. Replies: 33
    Last Post: 03-11-2013, 09:37 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