Solved

Excel Macro Challenge Pt 2

Posted on 2012-04-12
2
278 Views
Last Modified: 2012-04-12
Hi All, Firstly refer to my question in
http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_27661689.html

That solution is good, but I have one problem.

Firstly, the data  returned in the line
For Each r In rProd returns values (numeric) as expected even though the cells are actually references to another sheet and cell.

Likewise when this line is exected, the column has references elsewhere. They will evaulate to the same but are not found.

That is r will be say 148, but .Find will not find that as .Find is a string search - and the cell will have saheetname!$a$1 for instance.

How can I search the column on the evaluated values?

The rest of the code is perfect and performs exactly as needed.


Kelvin
0
Comment
Question by:Kelvin Sparks
2 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 37836804
Replace:
Set rFind = .Find(What:=r, LookAt:=xlWhole, MatchCase:=False, SearchFormat:=False)

Open in new window

with:
Set rFind = .Find(What:=r, LookIn:=xlValues, LookAt:=xlWhole, MatchCase:=False, SearchFormat:=False)

Open in new window

0
 
LVL 22

Author Closing Comment

by:Kelvin Sparks
ID: 37836973
Perfect thanks
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

Suggested Solutions

Title # Comments Views Activity
Help with Adding text from a form to a worksheet 5 37
Add a range in an Excel graph 5 36
Delete Text 7 35
simple vba query 9 23
A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 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

25 Experts available now in Live!

Get 1:1 Help Now