Why would you even need such a large UDF. This should do it.
Function MAXVAL(strTEXT As String) As Long
Dim lngLoop As Long
For lngLoop = 1 To Len(strTEXT)
MAXVAL = Application.Max(1 * IIf(IsNumeric(Mid(strTEXT, lngLoop,
1)), Mid(strTEXT, lngLoop, 1), 0), MAXVAL)
Next lngLoop
E
Dear Pravesh,
Try it..UDF
*For Minimum 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
/2012 09:42
To: excel-macros@googlegroups.com
Subject: $$Excel-Macros$$ Minimum & Maximum value of a Cell
Hi Group,
I need to extract min & max value of a cell.
Sample sheet is attached herewith.
Thanks in advance.
With Regards,
Pravesh
--
FORUM RULES (986+ members already BA
Hi Group,
I need to extract min & max value of a cell.
Sample sheet is attached herewith.
Thanks in advance.
With Regards,
Pravesh
--
FORUM RULES (986+ members already BANNED for violation)
1) Use concise, accurate thread titles. Poor thread titles, like Please Help,
Urgent, Need Help, Formul