If you want to find the smallest numeric value in a cell. Snapshot below-
Here is the UDF to extract the smallest numeric value .
Function Minval(x As String)
Dim i As Integer, minx As Integer
For i = 1 To Len(x)
If IsNumeric(Mid(x, i, 1)) Then
minx = Mid(x, i, 1)
Exit For
End If
Next
For i = 1 To Len(x)
If IsNumeric(Mid(x, i, 1)) Then
If Mid(x, i, 1) < minx Then
minx = Mid(x, i, 1)
End If
End If
Next i
Minval = minx
End Function
Type in B2 "=Minval(A2)"
Subscribe to:
Post Comments (Atom)
Import data from SQL
Macro to import data from SQL using ADO connection string: Sub Import_data_from_SQL() ' Tools -> References -> Microsoft Active...
-
If you want to copy the data from pdf file to Excel. Sub method1_using_sendkey() Dim task ' open the file ' change the path of ...
-
Macro to import data from SQL using ADO connection string: Sub Import_data_from_SQL() ' Tools -> References -> Microsoft Active...
No comments:
Post a Comment