PDA

View Full Version : Solved: Finding the Correct Value



Opv
04-25-2010, 01:09 PM
I have a simple script to find a value within a range of values. The script is working, in that it is not receiving an error and it is technically finding the designated value, but it is not necessarily finding the correct value in all instances. By that I mean if I am searching for the value, 35, and the number 235 is found within the array first, the script results in 235 rather than the desired number of 35.

Is there a way to force the find routine to distinguish between values so that it will always find the desired value?

Opv
04-25-2010, 01:23 PM
Never mind, I figured it out.

Opv

Aussiebear
04-25-2010, 02:53 PM
Hi OPV, If you find a solution to any issue posted here, would you be so kind as to post the solution for others to see. It could be a learning experience for others to follow as well.

Opv
04-25-2010, 02:59 PM
Hi OPV, If you find a solution to any issue posted here, would you be so kind as to post the solution for others to see. It could be a learning experience for others to follow as well.

It was just a minor oversight on my part when I constructed my find script. I failed to include the instruction, "xlLookAt:=Whole" in my find routine, so it must have defaulted to "part" and, hence, found 235 rather than 35 since 235 was listed first in the target range. Adding the above parameter corrected the problem.

Opv