Rony Rabijns Geplaatst: 6 maart 2005 Geplaatst: 6 maart 2005 Ik wil van een veld, ieder woord apart opdelen in een multilinekey. Hierbij volstaan de eerste 5 karakters van een woord. Het mag niet gescript worden ! voorbeeld 1 : VAN DER STRAETEN De multilinekey wordt dan : V¶ VA¶ VAN¶ D¶ DE¶ DER¶ S¶ ST¶ STR¶ STRA¶ STRAE voorbeeld 2 : VANDER STRAETEN De multilinekey wordt dan : V¶ VA¶ VAN¶ VAND¶ VANDE¶ S¶ ST¶ STR¶ STRA¶ STRAE voorbeeld 3 : VANDERSTRAETEN De multilinekey wordt dan : V¶ VA¶ VAN¶ VAND¶ VANDE Wie wil er mee de uitdaging aangaan ? Quote
0 Sanne Geplaatst: 7 maart 2005 Geplaatst: 7 maart 2005 Stap 1: Custom Function [FieldBeginsWith ( Text )] Case ( Length ( Text ) > 1 ; FieldBeginsWith ( Left ( Text ; Length ( Text ) - 1 ) ) & "¶" & Text; Text ) //http://www.excelisys.com/services/fmp7/tips_tricks.htm Stap 2: Custom Function [WordBeginsWith ( Text )]: deze functie gebruikt de vorige functie: Case ( WordCount ( Text ) > 1 ; WordBeginsWith ( LeftWords ( Text ; WordCount ( Text ) - 1 ) ) & "¶" & FieldBeginsWith ( RightWords ( Text ; 1 ) ) & "¶" ; FieldBeginsWith ( RightWords ( Text ; 1 ) ) & "¶" ) //http://www.excelisys.com/services/fmp7/tips_tricks.htm Heb ik niet zelf bedacht, maar is van Excelisys: http://www.excelisys.com/services/fmp7/tips_tricks.htm - Bovenste voorbeeldbestand "Recursive Calculations" Lijkt me eenvoudig aan te passen naar jouw eis van 5 karakters toe met een Left(text ; 5). Quote
0 Rony Rabijns Geplaatst: 8 maart 2005 Auteur Geplaatst: 8 maart 2005 Thx Sanne, ik heb er zelf ook nog eentje gevonden intussen : AllTextCombinations(theText) If( (Length(theText)<2); theText ; //else, note that function fails if text is more than 15 characters long so subset it If(Length(thetext)>15; AllTextCombinations(Left(theText;15)) & "¶" & AllTextCombinations(Middle ( theText ; 16 ; Length(theText)-15 )); theText & "¶" & AllTextCombinations(Left ( theText; (Length(theText)-1) )) & "¶" & AllTextCombinations(Right ( theText; (Length(theText)-1) ))) ) (afkomstig van Peter Gort, Denbigh International http://www.denbigh.com.au ) Opgelet : Deze indexeert alle mogelijkheden van een tekstveld ! Het jaagt wel de bestandsgrootte de lucht in ! Quote
Vraag
Rony Rabijns
Ik wil van een veld, ieder woord apart opdelen in een multilinekey. Hierbij volstaan de eerste 5 karakters van een woord. Het mag niet gescript worden !
voorbeeld 1 : VAN DER STRAETEN
De multilinekey wordt dan :
V¶
VA¶
VAN¶
D¶
DE¶
DER¶
S¶
ST¶
STR¶
STRA¶
STRAE
voorbeeld 2 : VANDER STRAETEN
De multilinekey wordt dan :
V¶
VA¶
VAN¶
VAND¶
VANDE¶
S¶
ST¶
STR¶
STRA¶
STRAE
voorbeeld 3 : VANDERSTRAETEN
De multilinekey wordt dan :
V¶
VA¶
VAN¶
VAND¶
VANDE
Wie wil er mee de uitdaging aangaan ?
2 antwoorden op deze vraag
Aanbevolen berichten
Doe mee aan dit gesprek
Je kunt dit nu plaatsen en later registreren. Indien je reeds een account hebt, log dan nu in om het bericht te plaatsen met je account.