compare string

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
 
M

Max

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top