August 13, 200916 yr I'm having a foggy brain moment ... I have a text field that I would like to delete all the text in the first 18 lines, for over 7,000 records. The field contains a Product description, product ID, UPC and vendor record. I have each of these in separate fields. The text files were imported (originally Windows XP Notepad) as .txt files. Can someone point me in the right direction? Data example: AQUARIUM DESIGNS INC - AD ACRYLIC AQUARIUM CLEAN 8OZ Product ID: AAD00200 UPC: 899740002005 Vendor: AQUARIUM DESIGNS INC
August 13, 200916 yr I am not sure what your example shows - it seems to have a lot of empty lines. To retain all but the first 18 paragraphs of text (incl. empty paragraphs), you could use something like = RightValues ( text ; ValueCount ( text ) - 18 )
August 13, 200916 yr Author This will definitely work. Is it possible to write a script that will delete all the text "above" the string that begins with "Vendor:"? (All the records have the first four lines in the field.) Here's a better example: AQUARIUM DESIGNS INC - AD ACRYLIC AQUARIUM CLEAN 8OZ Product ID: AAD00200 UPC: 899740002005 Vendor: AQUARIUM DESIGNS INC Anti-Static formula for cleaning and coating glass. Repels dust, water spots and fingerprints. Can also be used on other glass or hard and shiny surfaces. • CLEANER BUFFER & POLISHER SPRAY BOTTLE • AMMONIA & ALCOHOL FREE • ANTI STATIC • FISH & REEF SAFE ----- Here's the finished product I'm trying to create: Anti-Static formula for cleaning and coating glass. Repels dust, water spots and fingerprints. Can also be used on other glass or hard and shiny surfaces. • CLEANER BUFFER & POLISHER SPRAY BOTTLE • AMMONIA & ALCOHOL FREE • ANTI STATIC • FISH & REEF SAFE
August 13, 200916 yr It's possible - but it would be better to approach this in a different way, starting with something like = Let ( [ a = Position ( text ; "¶Vendor:" ; 1 ; 1 ) ; start = Position ( text ; ¶ ; a ; 2 ) ] ; Right ( text ; Length ( text ) - start ) )
August 13, 200916 yr Hi comment, Nice calculation. I would enclose it in the Custom Function Trim4 to eliminate the leading paragraphs. Lee
Create an account or sign in to comment