View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default Entering a range of numbers and searching same

Cool.........gotcha now.....
Here's a mod on Gary's code that will locate the cursor to the cell just to
the right of the second column (where possibly your link to the doc yo're
after may be)..........it's set up to be used in conjunction with the
Conditional Formatting thing I gave you yesterday.....just typing your Doc
number in the InputBox that pops up will automatically put it in the cell G1
and control the CF.........

Sub FindDoc()
Dim r As Range
Dim j, k, l As Long
Set r = Intersect(ActiveSheet.UsedRange, Columns("A:A"))
j = r.Rows.Count
k = --InputBox("Enter document number:")
Range("g1").Value = k
For l = 1 To j
If k = Cells(l, 1).Value Then
If k <= Cells(l, 2).Value Then
Cells(l, 3).Select
' MsgBox ("Document Number " & k & " Client " & Cells(l, 3).Value)
Exit Sub
End If
End If
Next
MsgBox ("Document Number " & k & " not assigned")
End Sub

hth
Vaya con Dios
Chuck, CABGx3



"Penny" wrote:

That makes NO sense!!!!

What I mean to say ... the Conditional Format finds the record for me.
Formats it exactly how you showed me to do so. Once it does this, I manually
page up/down to scroll through the doc and find that record. I was asking if
there was a way to tell it to go to that record/field it has found/formatted.

Sorry for the confusion. Thanks for asking me to clarify.

Penny

"CLR" wrote:

Hi Penny........glad to have been of some bit of help..........please
clarify your statement for me...

"the Conditional Format gives me the exact field formatted
how I want it... and then I scroll through the doc to find the one
selected. "