Date Range in Excel Macro

135 pts.
Tags:
Agents
Macros
Microsoft Excel
Microsoft Excel macros
Hi, I just want to know if its possible to do a macro wherein I can select the dates to be read in my report. For instance, I have a Table (below) where column A is the Date, column B is the name of Agents, Column C is the Section and the Column D is the Error Category. A window will pop-up where in I can select the date range the the macro will read. Usually I have a monthly report and I keep on sorting and filtering the Table if my boss is asking for a weekly report. The report usually are: How many errors does each Agents received on this particular dates? What section has most errors in this particular dates? What are the most common errors in this particular dates? What are the most common error of each agents in this particualr dates? What are the most common errors of each section in this particular dates? [table style="border-collapse: collapse; width: 356pt;" width="473" border="0" cellpadding="0" cellspacing="0"> [tbody] [tr style="height: 15pt;" height="20"> [td class="xl65" style="height: 15pt; width: 79pt;" width="105" height="20">Date[/td] [td class="xl66" style="border-left: medium none; width: 74pt;" width="98">Name[/td] [td class="xl66" style="border-left: medium none; width: 89pt;" width="118">Section[/td] [td class="xl66" style="border-left: medium none; width: 114pt;" width="152">Error Category[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">21-Nov[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Peter[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Delta[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Name[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">21-Nov[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Jack[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Alpha[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Age[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">21-Nov[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Mike[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Bravo[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Address[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">21-Nov[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Cris[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Alpha[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Name[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">21-Nov[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Sam[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Charlie[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Name[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">21-Nov[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Noah[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Charlie[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Name[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">21-Nov[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Jack[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Charlie[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Name[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">25-Nov[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Mike[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Charlie[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Comment[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">25-Nov[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Cris[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Delta[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Comment[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">25-Nov[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Peter[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Alpha[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Comment[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">25-Nov[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Jack[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Bravo[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Comment[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">25-Nov[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Mike[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Alpha[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Name[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">25-Nov[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Cris[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Delta[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Address[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">29-Nov[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Jack[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Alpha[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Address[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">29-Nov[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Mike[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Bravo[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Age[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">29-Nov[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Cris[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Alpha[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Age[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">29-Nov[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Peter[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Alpha[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Age[/td] [/tr] [/tbody] [/table] [table style="border-collapse: collapse; height: 340px;" width="476" border="0" cellpadding="0" cellspacing="0"> [tbody] [tr style="height: 15pt;" height="20"> [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">Hope you have an answer to my problem. Thank you in advance![/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [/tr] [tr style="height: 15pt;" height="20"> [td class="xl64" style="height: 15pt; border-top: medium none;" height="20">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [td class="xl63" style="border-top: medium none; border-left: medium none;">[/td] [/tr] [/tr] [/tbody] [/table]

Software/Hardware used:
MS Excel

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Eron09
    Hi, Sorry for the mess on my prior question... Hi, I just want to know if its possible to do a macro wherein I can select the dates to be read in my report. For instance, I have a Table (below) where column A is the Date, column B is the name of Agents, Column C is the Section and the Column D is the Error Category. A window will pop-up where in I can select the date range the the macro will read. Usually I have a monthly report and I keep on sorting and filtering the Table if my boss is asking for a weekly report. The report usually are: How many errors does each Agents received on this particular dates? What section has most errors in this particular dates? What are the most common errors in this particular dates? What are the most common error of each agents in this particualr dates? What are the most common errors of each section in this particular dates? Date Name Section Error Category 21-Nov Peter Delta Name 21-Nov Jack Alpha Age 21-Nov Mike Bravo Address 21-Nov Cris Alpha Name 21-Nov Sam Charlie Name 21-Nov Noah Charlie Name 21-Nov Jack Charlie Name 25-Nov Mike Charlie Comment 25-Nov Cris Delta Comment 25-Nov Peter Alpha Comment 25-Nov Jack Bravo Comment 25-Nov Mike Alpha Name 25-Nov Cris Delta Address 29-Nov Jack Alpha Address 29-Nov Mike Bravo Age 29-Nov Cris Alpha Age 29-Nov Peter Alpha Age
    135 pointsBadges:
    report
  • carlosdl
    Are you asking how to create a macro to enter the dates range, or how to create the reports that will answer all those questions, or both ? That is the kind of task that would be much more easier using a database instead of spreadsheet. Have you considered that option ?
    69,835 pointsBadges:
    report
  • Eron09
    Hi Carlosdl, Both, actually I am currently using formula in excel but I'm thinking if its possible for macro. I haven't thought of using database cause I don't know how to do it while in macro I can understand it a little bit. :-)
    135 pointsBadges:
    report
  • carlosdl
    If you provide the formulas you are currently using, it should be easier to translate them into a macro.
    69,835 pointsBadges:
    report
  • Eron09
    I have 3 columns that counts all the Agents Name, the Agents Name and the Error, Error and the Section. The formula is... Agents Name =B2 (Column B) Agents Name and the Error =B2&D2 (Column B&D) Error and the Section =D2&C2 (Column D&C) so on and so forth....And then I have a Table wherein the first column is the list of agents name. To count all the agents error I simply use this formula.. IF(A1="","",IF(A41>0,COUNTIF($AI$3:$AL$1555,A41))) SO ON AND SO FORTH...
    135 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following