October 14, 200619 yr Last post I learned about the replace function. I have also learned about right and left words. But I have data that I can't use Replace on. Maybe left or right word, not sure. So, here it goes. Data Fields>>[color:red]imported_data(text), country_short_name(calculation), country_long_name(calculation) My [color:red]imported_data looks like this. {between words are space, not tabs} [color:green]AFGHANISTAN AF AMERICAN SAMOA AS ANTIGUA AND BARBUDA AG BRITISH INDIAN OCEAN TERRITORY IO To get the country_short_name>>I am using this calculation>>[color:purple]RightWords (Imported_Data ; 1 ) The problem is with the country_long_name>>I tried this calculation>>[color:purple]Substitute (Imported_Data;RightWords ( Imported_Data ; 1 ); "") It works, but if the coutnry_short_name is AR and if AR is in the country_long_name is substitues " " for AR. Thus, this calculation won't work :qwery: [color:brown]So, now I am stuck and that is why I have turned to you. Thanks in advance. Chuck
October 15, 200619 yr Author Thanks for the quick answer comment. Yep, that works. Slick function actually. The wordcount(imported_data)-1. Cool. [color:green]Count all the word of imported_data and minus 1. :chili:
Create an account or sign in to comment