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 minx = Mid(x, i, 1) End If End If Next i Minval = minx End Function *For Maximum Value* Function Maxval(x As String) Dim i As Integer, maxx As Integer For i = 1 To Len(x) If IsNumeric(Mid(x, i, 1)) Then maxx = 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) > maxx Then maxx = Mid(x, i, 1) End If End If Next i Maxval = maxx End Function See attached sheet -- Thanks & regards, Noorain Ansari *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/> *http://noorain-ansari.blogspot.com/* <http://noorain-ansari.blogspot.com/> On Tue, Jan 31, 2012 at 9:42 AM, PRAVESH KUMAR <praveshkash...@gmail.com>wrote: > 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, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > > 2) Don't post a question in the thread of another member. > > 3) Don't post questions regarding breaking or bypassing any security > measure. > > 4) Acknowledge the responses you receive, good or bad. > > 5) Cross-promotion of, or links to, forums competitive to this forum in > signatures are prohibited. > > NOTE : Don't ever post personal or confidential data in a workbook. Forum > owners and members are not responsible for any loss. > > > ------------------------------------------------------------------------------------------------------ > To post to this group, send email to excel-macros@googlegroups.com > -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com
query(Solved).xlsm
Description: Binary data