Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
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 Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 6th, 2009, 03:38 AM
Registered User
 
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??
 
Old November 6th, 2009, 05:56 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 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)





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 24th, 2007 11:39 PM
Converting excel data to Access using excel VBA ShaileshShinde VB Databases Basics 1 April 26th, 2006 07:57 AM
Copy data from webpage to excel using vba kg8299 Excel VBA 0 April 5th, 2006 03:51 AM
import data from text file to excel(VBA) topr Excel VBA 2 August 26th, 2004 11:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.