p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Microsoft Office > Excel VBA > Excel VBA
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 6th, 2009, 03:38 AM
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 5%
Activity: 5% Activity: 5% Activity: 5%
 
Join Date: Oct 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default Excel vba: data processing

I'd like to use vba to process a large data set, from cell A1 to L60000, my problem is: i hope to remove irrelevant record with some criteria:
  1. weekday(column b)>5 : remove
  2. vlookup to another file for the group
  3. for group A & C, if not 9am<time value in column c< 5pm : remove
  4. for group B, if not 9am<time value in column c< 6pm : remove

Quote:
Sub Comm_prepare_data()
Range("m1") = "Weekday"

Range("m2") = "=weekday(b2,2)"
Range("M2").AutoFill Destination:=Range("M2")

For Each Data In Worksheets("Sheet1").Range("m2:$0").Cells
If (Data.Value) > 5 Then ???
Next
What should i do??
__________________
Snowman.HK
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old November 6th, 2009, 05:56 AM
Friend of Wrox
Points: 1,449, Level: 15
Points: 1,449, Level: 15 Points: 1,449, Level: 15 Points: 1,449, Level: 15
Activity: 17%
Activity: 17% Activity: 17% Activity: 17%
 
Join Date: Sep 2005
Location: , , .
Posts: 420
Thanks: 0
Thanked 14 Times in 14 Posts
Default

Hi

The best option would be to use ADO in Excel and query for the criteria

Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips &amp; Tricks (http://www.vbadud.blogspot.com)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
get perticular data from outlook mail into excel using VBA kulkasac Excel VBA 3 January 23rd, 2009 05:05 AM
VBA Code to read the structure & data of an excel alam1 Excel VBA 0 April 25th, 2007 12:39 AM
Converting excel data to Access using excel VBA ShaileshShinde VB Databases Basics 1 April 26th, 2006 08:57 AM
Copy data from webpage to excel using vba kg8299 Excel VBA 0 April 5th, 2006 04:51 AM
import data from text file to excel(VBA) topr Excel VBA 2 August 27th, 2004 12:36 AM



All times are GMT -4. The time now is 01:45 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc