Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Tom is offline
external usenet poster
 
Posts: 44
Default Max-function with alphanumeric values?!?

Hi

I have a column with alphanumeric data. The max function works only with
numeric values. How to calculate the max-value of alphanumeric values?

Tom


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Max-function with alphanumeric values?!?

Hi Tom,

Here is an easy way...please use code function like =CODE(A1), so you can
use MAX function.


--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Colo of 'The Road of The Cell Masters' :)

URL:http://www.interq.or.jp/sun/puremis/...astersLink.htm


/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


"Tom" wrote in message
...
Hi

I have a column with alphanumeric data. The max function works only with
numeric values. How to calculate the max-value of alphanumeric values?

Tom



  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Tom is offline
external usenet poster
 
Posts: 44
Default Max-function with alphanumeric values?!?

Coolio

I suppose that the Code-function fails... I have numbers like this:

01/001
01/002
01/003
02/001

Tom



"Colo" schrieb im Newsbeitrag ...
Hi Tom,

Here is an easy way...please use code function like =CODE(A1), so you can
use MAX function.


--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Colo of 'The Road of The Cell Masters' :)

URL:http://www.interq.or.jp/sun/puremis/...astersLink.htm


/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


"Tom" wrote in message
...
Hi

I have a column with alphanumeric data. The max function works only with
numeric values. How to calculate the max-value of alphanumeric values?

Tom



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Max-function with alphanumeric values?!?

What is the max in your sample data - does 02 take precedence over any 01 in
the first two places or is the max the highest of the last 3 digits.

Can a helper column be used next to this column?

--
Regards,
Tom Ogilvy

"Tom" wrote in message
...
Coolio

I suppose that the Code-function fails... I have numbers like this:

01/001
01/002
01/003
02/001

Tom



"Colo" schrieb im Newsbeitrag
...
Hi Tom,

Here is an easy way...please use code function like =CODE(A1), so you can
use MAX function.


--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Colo of 'The Road of The Cell Masters' :)

URL:http://www.interq.or.jp/sun/puremis/...astersLink.htm


/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


"Tom" wrote in message
...
Hi

I have a column with alphanumeric data. The max function works only with
numeric values. How to calculate the max-value of alphanumeric values?

Tom





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Max-function with alphanumeric values?!?

Hi Tom, Hmmm...we need more information. Which one is MAX in your example.

02 of 02/001 is MAX? or 003 of 01/003?

Anyway try something like this...(the Code-function must fails again.)

'-----------------CODE -------------------------------------------------

Sub Test()
MsgBox CustomMax([A1:A4], 1) 'Take value of the Left side
MsgBox CustomMax([A1:A4], 2) 'Take value of the Right side
End Sub


Function CustomMax(ByVal Target As Range, ByVal lngNum As Long) As String
Dim buf1, buf2()
Dim ret
Dim i As Long
buf1 = Target.Value
ReDim buf2(LBound(buf1) To UBound(buf1))
For i = LBound(buf2) To UBound(buf2)
buf2(i) = Val(Split(buf1(i, 1), "/")(lngNum - 1))
Next
ret = Application.Match(Application.WorksheetFunction.Ma x(buf2), buf2,
0)
If Not IsError(ret) Then
CustomMax = buf1(ret, 1)
Else
CustomMax = "Error"
End If
End Function

'----------------------------------------------------------
"Tom" wrote in message
...
Coolio

I suppose that the Code-function fails... I have numbers like this:

01/001
01/002
01/003
02/001

Tom



"Colo" schrieb im Newsbeitrag
...
Hi Tom,

Here is an easy way...please use code function like =CODE(A1), so you can
use MAX function.


--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Colo of 'The Road of The Cell Masters' :)

URL:http://www.interq.or.jp/sun/puremis/...astersLink.htm


/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


"Tom" wrote in message
...
Hi

I have a column with alphanumeric data. The max function works only with
numeric values. How to calculate the max-value of alphanumeric values?

Tom






  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Tom is offline
external usenet poster
 
Posts: 44
Default Max-function with alphanumeric values?!?

the max-value of the the following entries is 02/001

01/001
01/002
01/003
02/001

I can solve this with a customized function, but I can't believe that this
can't be solved with a worksheet function.

Tom



"Tom Ogilvy" schrieb im Newsbeitrag
...
What is the max in your sample data - does 02 take precedence over any 01

in
the first two places or is the max the highest of the last 3 digits.

Can a helper column be used next to this column?

--
Regards,
Tom Ogilvy

"Tom" wrote in message
...
Coolio

I suppose that the Code-function fails... I have numbers like this:

01/001
01/002
01/003
02/001

Tom



"Colo" schrieb im Newsbeitrag
...
Hi Tom,

Here is an easy way...please use code function like =CODE(A1), so you

can
use MAX function.


--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Colo of 'The Road of The Cell Masters' :)

URL:http://www.interq.or.jp/sun/puremis/...astersLink.htm


/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


"Tom" wrote in message
...
Hi

I have a column with alphanumeric data. The max function works only

with
numeric values. How to calculate the max-value of alphanumeric values?

Tom







  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Max-function with alphanumeric values?!?

you could use a helper column (assume values in A, helper column B)

=SUMPRODUCT(CODE(MID(A1,{1,2,3,4,5,6},1)),10^{5,4, 3,2,1,0})

Drag fill down column B.

=Index(A1:A4,Match(Max(B1:B4),B1:B4,0),1)

Basically, the concept of max for strings is not defined. So believe it.

--
Regards,
Tom Ogilvy

"Tom" wrote in message
...
the max-value of the the following entries is 02/001

01/001
01/002
01/003
02/001

I can solve this with a customized function, but I can't believe that this
can't be solved with a worksheet function.

Tom



"Tom Ogilvy" schrieb im Newsbeitrag
...
What is the max in your sample data - does 02 take precedence over any

01
in
the first two places or is the max the highest of the last 3 digits.

Can a helper column be used next to this column?

--
Regards,
Tom Ogilvy

"Tom" wrote in message
...
Coolio

I suppose that the Code-function fails... I have numbers like this:

01/001
01/002
01/003
02/001

Tom



"Colo" schrieb im Newsbeitrag
...
Hi Tom,

Here is an easy way...please use code function like =CODE(A1), so you

can
use MAX function.


--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Colo of 'The Road of The Cell Masters' :)

URL:http://www.interq.or.jp/sun/puremis/...astersLink.htm


/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


"Tom" wrote in message
...
Hi

I have a column with alphanumeric data. The max function works only

with
numeric values. How to calculate the max-value of alphanumeric

values?

Tom









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing Text from Alphanumeric values Syed Rizvi Excel Discussion (Misc queries) 6 April 10th 08 05:00 PM
Removing text from Alphanumeric values Syed Rizvi Excel Worksheet Functions 1 April 10th 08 04:04 PM
VLOOKUP with numeric and alphanumeric values Dan Excel Discussion (Misc queries) 6 November 2nd 07 04:59 PM
Need to test for alphanumeric value and write numeric values to ce Pyramid 36 Excel Worksheet Functions 3 August 3rd 07 03:15 AM
how do i enter alphanumeric values? ECY Excel Discussion (Misc queries) 1 January 20th 06 08:46 PM


All times are GMT +1. The time now is 09:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"