Date range Count using macro in Excel

December 6, 2010 at 06:57:56
Specs: Windows XP
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


See More: Date range Count using macro in Excel

Report •


#1
December 6, 2010 at 07:53:13
re: "I just want to know if its possible to do a macro wherein I can select the dates to be read in my report."

Yes, it's possible.

Posting Tip: Before posting Data or VBA Code, read this How-To.


Report •

#2
December 6, 2010 at 07:55:07
Can you teach me how?

Thanks DerbyDad03!


Report •

#3
December 6, 2010 at 08:48:56
Hmm...I guess you wanted to know a little more than "I just want to know if its possible... "

re: "A window will pop-up where in I can select the date range the the macro will read."

This will do that:

Sub SelectRange()
 Set MyRange = Application.InputBox("Select Date Range", Type:=8)
End Sub

Posting Tip: Before posting Data or VBA Code, read this How-To.


Report •

Related Solutions

#4
December 6, 2010 at 09:16:33
Yes! because I'm using formula in excel and it results to big file.

Report •

Ask Question