ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   compare string (https://www.excelbanter.com/excel-worksheet-functions/208329-compare-string.html)

HugeHard

compare string
 
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(ABAC, AB, AC), but I need use this for many time to
compare all strings, is there any simple methods?
Thanks,
D.L

Max

compare string
 
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)=RIG HT(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
---
"HugeHard" wrote:
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(ABAC, AB, AC), but I need use this for many time to
compare all strings, is there any simple methods?
Thanks,
D.L



All times are GMT +1. The time now is 01:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com