Solved

Excel Macro Challenge Pt 2

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

777 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