Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Excel, Filtering and extractin data

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,60357
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Excel, Filtering and extractin data
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Excel, Filtering and extractin data - 5/18/2008 12:48:35 PM   
  msalonen

 

Posts: 1
Score: 0
Joined: 5/18/2008
Status: offline
Hi

I am trying to create a macro that reads in two sets of dates and then selects certain data based on a condition.
used record a macro to get the following code, but when attempting to run the macro (before and after editing it) all i get is an empty sheet.

code:

Sub Macro5()

'Activate the STATS sheet
Windows("STATISTICS-003.xlsm").Activate
Worksheets(3).Select

Date1 = "='[STATISTICS-003.xlsm]Analysis'!E3"
Date2 = "='[STATISTICS-003.xlsm]Analysis'!E4"

Columns("B:B").Select
ActiveSheet.Range("$A$1:$AS$501").AutoFilter Field:=2, Criteria1:= >=Date1, Operator:=xlAnd, Criteria2:= <=Date2

End Sub


My complete objective is to look at data between two given dates, and from that look at a particular column and count how many items there are of a particular kind.
Any help is greatly appreciated, THANKS!

_____________________________

/marko
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Excel, Filtering and extractin data Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts