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
Solved

Excel Macro Challenge Pt 2

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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 article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

856 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