LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Help with find function please!

I am using VBScript to automate Excel through another program. I have written
some data to a row in the Excel worksheet. This part works perfectly.

I then need to look for a value in the row and get the address of the cell
where that value is located. The problem I am having is that the find
function is returning the wrong cell. When I look for the value 1, it will
return any cell in which the value contains a '1' such as cells with values
of 11, 21, or 111. Is there a parameter I need to change or a workaround for
this?

Here is a short sample of my code:
dim lookupval
dim myLoc

lookupval = 1

set myLoc =
objExcel.workbooks(1).worksheets(1).Range("A2:Z2") .Find(CInt(lookupVal))
msgbox myLoc.column





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find Function Denver Excel Worksheet Functions 3 July 9th 09 12:05 PM
Need to find a function. MikeCampbell Excel Worksheet Functions 2 January 29th 07 01:40 AM
Find Function Guy Lydig Excel Discussion (Misc queries) 2 May 19th 06 07:19 PM
FIND function? Sonya Excel Discussion (Misc queries) 3 October 22nd 05 04:53 AM
backwards find function to find character in a string of text Ashleigh K. Excel Programming 1 January 14th 04 04:36 PM


All times are GMT +1. The time now is 02:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"