View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default find first o from right

=SEARCH("0";ByteReverse(A1))

where cellA1 contains the number to be searched.

The ByteReverse UDF:

Function ByteReverse(InputString As String) As String
Dim i As Long
Dim ByteStr, ResultStr As String
ResultStr = ""
For i = Len(InputString) To 1 Step -1
ByteStr = Mid(InputString, i, 1)
ResultStr = ResultStr & ByteStr
Next i
ByteReverse = ResultStr
End Function

Regards,
Stefi

€˛delmac€¯ ezt Ć*rta:

HI all I have a column of numbers that includes o such as 0045a
078
009. Is there are formula that enables me to find the first 0 from the
right. Thanks for all your help on this and previuos requests.
--
delmac