Hi Malkie Thanks for your off-list message, to which I will respond here.
I don't think there is any formula you can use to extract the last word without cases or ifs, and Geert's solution is what I would use. As for the second part of the question, to which I haven't seen a response yet, to extract all but the first word, I would use: substring[P1F1; length[subfield[P1F1;" ";1]] + 2; length[P1F1] - length[subfield[P1F1;" ";1]] - 1 ] and to extract all but the last word - assuming this has been stored in P1F2 substring[P1F1; 1 ; length[P1F1] - length[P1F2] - 1] Hope this helps Robert On Tue, Aug 11, 2009 at 2:51 PM, <[email protected]> wrote: > Hi Everyone; > > I desperately need your expertise. I would like to make a formula in a > field (not in a report) that would automatically extract the last word of > another field, something like with a subfield or substring function or > whatever. The amount of words in that field are not identical. It can > vary between 2 and 10 or even more. > > Also, how would I extract all the words of a field besides the last > word or besides the first word? > > Malkie > > -- Robert Pollard Information Habitat: Where Information Lives http://habitat.igc.org/ [email protected] 1.212.864.3156 http://friendfeed.com/climatechange3
_______________________________________________ Dataperf mailing list [email protected] http://lists.dataperfect.nl/mailman/listinfo/dataperf
