Finding data in a Range / Returning Cell Location

  • Thread starter Thread starter Betsy Jones
  • Start date Start date
B

Betsy Jones

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
 
Post your code and indicate what happens when you run it.

Alan Beban
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top