Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding data in a Range / Returning Cell Location
I have set a Range in Worksheet2 called Master_Rate. From
within my VBA code I need to be able to locate the cell in that range that contains a specific value and then return the cell reference. I have tried using the Find Method but am not gettng the results I expected. Thanks for any help Betsy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding data in a Range / Returning Cell Location
Post your code and indicate what happens when you run it.
Alan Beban Betsy Jones wrote: I have set a Range in Worksheet2 called Master_Rate. From within my VBA code I need to be able to locate the cell in that range that contains a specific value and then return the cell reference. I have tried using the Find Method but am not gettng the results I expected. Thanks for any help Betsy |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding data in a Range / Returning Cell Location
Here is the code: Function Find_Min_Rate() Dim Cell As Range WS2.Activate Set Cell = Range("Master_Rates").Find(what:=MinRate, LookIn:=xlValues) Cell.Select MsgBox "Cell address is " & Cell.Address(RowAbsolute:=False, ColumnAbsolute:=False) End Function It was 'sort of' working for a while. My range contains the values 6.000 thru 8.000 in increments of .125. If I searched for 6.125, I could locate the cell. If I searched for searched for 7 it would find 6.750. I think I can work around that (though I will take any suggestions. HOWEVER - Some gremlin seems to have invaded by computer. Now it doesn't seem to find a match whatever I do? HELP. Betsy *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding specific text in one cell and returning data from another | Excel Worksheet Functions | |||
Finding a cell location | New Users to Excel | |||
finding the data location of a list in my xls | Excel Discussion (Misc queries) | |||
finding cell location | Excel Discussion (Misc queries) | |||
Finding, and returning data. | New Users to Excel |