compare string

  • Thread starter Thread starter HugeHard
  • Start date Start date
H

HugeHard

Hi,
I want to find the min string within several strings. For example, the
string group include "2008wk32", "2008wk12", "2008wk01". I need find the min
string as "2008wk01".
I tried to use if(AB>AC, AB, AC), but I need use this for many time to
compare all strings, is there any simple methods?
Thanks,
D.L
 
One try ..

Assuming the strings are within B1:E1
In say, A2, array-entered, ie press CTRL+SHIFT+ENTER to confirm:
=INDEX(B1:E1,MATCH(TRUE,(MIN(RIGHT(B1:E1,2)+0)=RIGHT(B1:E1,2)+0),0))

Range B1:E1 is assumed fully populated, with the rightmost 2 char numeric.
Adapt to suit.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:19,500 Files:362 Subscribers:62
xdemechanik
 
Back
Top