Solved

Excel Macro Challenge Pt 2

Posted on 2012-04-12
2
265 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
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…

760 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

20 Experts available now in Live!

Get 1:1 Help Now