Solved

VBA Excel Comparison

Posted on 2014-09-09
2
159 Views
Last Modified: 2014-09-09
Hi Experts,

Wondering if I could get some assistance.  I have VBA that is comparing SourceData tab to Cost Tracker Budget Info tab to find the new project numbers on the SourceData tab and copy to the bottom of the Cost Tracker tab.  My problem is that the VBA is copying all of the project numbers over the VBA is at the bottom of the SourceData module.  When I tried to isolate the VBA and placed into Module1 the VBA errored on
Set findit = ws.Range("A4:a").Find(what:=ce.Value, lookat:=xlWhole)

Open in new window

.  And I am not sure why.

Any assistance would be appreciated.
EE-Test-2014.09.09.xlsm
0
Comment
Question by:jmac001
2 Comments
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
ID: 40313030
The specified range is incomplete.  Try this:
Set findit = ws.Range("A4:A" & Cells(Rows.Count, 1).End(xlUp).Row).Find(what:=ce.Value, lookat:=xlWhole)

Open in new window


Regards,
-Glenn
0
 

Author Closing Comment

by:jmac001
ID: 40313210
Thank you works perfectly.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now