Hello Tom, Thanks for your help. I ran the code you gave me and here is the error message. For example for sheet DPW US EQUITY: DPW US Equity -- 22 202 ERROR 22-322: Syntax error, expecting one of the following: ;, (, APPENDVER, APPENDVERSION, BASE, CREATE, DATA, FORCE, GETSORT, NEW, NOWARN, OUT. ERROR 202-322: The option or parameter is not recognized and will be ignored. The do loop starts from 4 because my data is in sheet 4 onward. Should I change the select memname , compress(memname,"'$") into :s1-:s9999 ?
... View more