Re: stripping out a text string

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: hgrove (hgrove.1dex2r_at_excelforum-nospam.com)
Date: 09/30/04


Date: Thu, 30 Sep 2004 15:06:00 -0500


benb wrote...
>I have a column of cells with text strings of varying lengths. The
last few
>characters of each string is an ID that I need to separate out from
the rest of the
>string. The ID follow the formate 3-characters, dash,
more-characters. Below are
>some examples of the text strings. . . .
..
>Examples:
>USD/CDS/MEX/BBVA-Madrid/E02-93622
>USD/CDS/COLOMBIA/E04-90881
>USD/CDS/MEXICO/E02-91435-A
>USD/CDS/MEXICO/M03-90870

An alternative approach. If these strings could contain arbitrary
characters, then the safest way to do this involves using a defiend
name like Seq referring to

=ROW(INDIRECT("1:1024"))

which returns an array of consecutive integers from 1 to 1024. Then use
it in formulas like

=RIGHT(A1,LEN(A1)-LOOKUP(2,1/(MID(A1,Seq,1)="/"),Seq))

or

=MID(A1,LOOKUP(2,1/(MID(A1,seq,1)="/"),seq)+1,1024)

-- 
hgrove
------------------------------------------------------------------------
hgrove's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=11432
View this thread: http://www.excelforum.com/showthread.php?threadid=265206


Relevant Pages

  • Re: Why R6RS is controversial
    ... the semantics of the language, ... behavior of grapheme-cluster characters under most linguistic ... as the strings grow longer. ... Normalization is hideously complicated, and may require many ...
    (comp.lang.scheme)
  • Re: Unicode LISP??
    ... I'm not experienced with Common Lisp library, ... terms of strings rather than characters. ... have their representation upgraded if they are updated in place. ...
    (comp.lang.lisp)
  • Re: not quite 1252
    ... The kill_gremlins function is intended to fix Unicode strings that have been obtained by decoding 8-bit strings using 'latin1' instead of 'cp1252'. ... In fact it wasn't, it was UTF-8 like Sergei wrote, but it was easy to convert it to cp1252, no problem. ... characters to documents marked up as ISO 8859-1 or other encodings. ...
    (comp.lang.python)
  • Re: How to check variables for uniqueness ?
    ... characters is the sequence SS. ... is simply capitalizing strings. ... The fact that case mapping in English /is/ simple is neither here not ... That is a fair criticism of the Unicode position. ...
    (comp.lang.java.programmer)
  • Re: How to check variables for uniqueness ?
    ... FI in English typography), so the correct uppercase version of those ... characters is the sequence SS. ... So you at least agree with me that it should be consistent with toUpperCase -- all strings should have a single canonical toUpperCase, a single canonical toLowerCase, both should define equivalence classes on the mixed-case input strings, these should be the SAME equivalence class, and equalsIgnoreCase should implement and embody the corresponding equivalence relation. ... The version that doesn't shouldn't surprise English speakers; the version that does shouldn't surprise anyone familiar with its locale-specific behavior for the locale actually used. ...
    (comp.lang.java.programmer)