Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Excel Macro Challenge Pt 2

Posted on 2012-04-12
2
Medium Priority
?
317 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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.

596 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