Solved

VBA Excel Comparison

Posted on 2014-09-09
2
165 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

840 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