Find a Cell Value

  • Thread starter Thread starter matt
  • Start date Start date
I'll give it a try.. thanks!!!!

Gary Keramidas said:
why not just use this

If Not temp Like "*[!0-9]*" Then

instead of

If temp <> " " And temp <> "$" And Asc(temp) <> WEIRD_SPACE Then


you only want the numbers, anyway.

(assist to rick)
--


Gary


matt said:
This is the trim function I have and it seems to be working:

Private Const WEIRD_SPACE = 160
___________________________________________________

My other code stuff, where I call the myTrim Function
___________________________________________________
Function myTrim(s As String) As String
On Error Resume Next
Dim i As Integer
Dim s2 As String
Dim temp As String

For i = 1 To Len(s)
temp = Mid(s, i, 1)
If temp <> " " And temp <> "$" And Asc(temp) <> WEIRD_SPACE Then
s2 = s2 & Mid(s, i, 1)
End If
Next

Err.Clear
myTrim = s2
End Function
 
Back
Top