View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Corey Corey is offline
external usenet poster
 
Posts: 363
Default How can i find and View required values ?

Tom,
I still get the same error???
"Tom Ogilvy" wrote in message ...
That would happen if you error values in column C. This will work around
that:

Sub ABC()
Dim v As Variant, i As Long
Dim s As String
v = Evaluate("if(Sheet4!$C$1:$C$500Sheet1!$G$8," & _
"Sheet4!$C$1:$C$500)")
For i = 1 To 500
If Not IsError(v(i, 1)) Then
If v(i, 1) < False Then
s = s & v(i, 1) & ","
End If
End If
Next
MsgBox s
End Sub

Yes, it shows multiple values. I wouldn't see using a msgbox as the final
product, but knowing nothing else about what you are doing, it is a good
placeholder.

--
Regards,
Tom Ogilvy


"Corey" wrote in message
...
Tom,
Trying your code i am getting a Type Mismatch error he

If v(i, 1) < False Then


I do not really understand what this bit does so i cannot solve it my
self, yet?
What if there is More than 1 value found, is this displayed on a msgbox??

Corey....


"Tom Ogilvy" wrote in message
...
find doesn't have an option of finding values greater than another value.

One way would be

Sub ABC()
Dim v As Variant, i As Long
Dim s As String
v = Evaluate("if(Sheet4!$C$1:$C$500Sheet1!$G$8," & _
"Sheet4!$C$1:$C$500)")
For i = 1 To 500
If v(i, 1) < False Then
s = s & v(i, 1) & ","
End If
Next
MsgBox s
End Sub

This is an array formula, so you can't use an entire column (nor should
you
want to).

--
Regards,
Tom Ogilvy


"Corey" wrote in message
...
I have data in sheet4 that i need to search for by value.
I want the user to Place a Numerical value in sheet1.Range(G8)
Then Click the Forms Button to search through Column C in Sheet4 for
values (=) that value.

What would be the BEST way to FIND this value(Macro Recorder does not
Record a FIND??), and
HOW can i display the Values found effectively for the User to VIEW ?

Corey....