Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On 17 Apr 2006 08:34:11 -0700, "paulinoluciano"
wrote: Despite I have received several very good suggestions in this thread that time they did not work very weel exactly for my problem. Therefore I would like to know if someone could help me again. A representative example of such proces can be see at http://delphi.phys.univ-tours.fr/Prolysis/cutter.html However, such engine is not as roboust as I woiuld need allowing to specify all desired rules in an Excel sheet. Thank you anyway. Luciano As I've written before, you can do this with Longre's add-in using Regular Expressions. B2: =REGEX.MID($A$2,"(.*?(?<!FP)(K|$)){"&COLUMNS($B:B) &"}",ROWS($B$2:B2)) copy/drag down and across for 0, 1 and 2 lost cuts. But some of your examples don't make sense to me. For example: ================ 1 lost cut = Cutting the sequence after the first K present in the sequence (The subsequences of this process should be put in C column:: AASSASDKASASDASFAFSASASADK ASASAFPKQREWEAQEOKSPADAOEK OQPPDAOPSKAEPQ AASSASDKASASDASFAFSASASADKASASAFPKQREWEAQEOK SPADAOEKOQPPDAOPSKAEPQ ======================== I don't understand how you get lines 4 and 5. Also, in your basic rules, you write: "Sequence is not cut if K is found before FP" But in your examples it seems as if your acting on a rule to "not cut if K is found AFTER FP" ========================= So far as having some variability, you could name two cells on your worksheet CutAfter Unless After In your example, CutAfter would be K UnlessAfter would be FP And the formula would be: =REGEX.MID($A$2,"(.*?(?<!"&UnlessAfter&")("&CutAft er&"|$)){"&COLUMNS($B:B)&"}",ROWS($B$2:B2)) Again, you drag down and across as far as necessary to accomodate all the "cuts" and all the "lost cuts" If these don't work, you will have to both explain more clearly, and also give examples of the results of the formulas, and the expected results. --ron |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Text manipulation | Excel Worksheet Functions | |||
Using Concatenate function to generate text in Text Box | Charts and Charting in Excel | |||
merged cells into one text cell, size varies dependant on text dat | Excel Discussion (Misc queries) | |||
SUMPRODUCT vs Text??? | Excel Worksheet Functions | |||
Read Text File into Excel Using VBA | Excel Discussion (Misc queries) |