Sunday, July 4, 2010

How to remove leading or trailing blank spaces in cells

Software Environment
Version:4.0
Edition:Excel 

1. Click Range button on Excel macros group panel, select Select range item, select the first cell in the worksheet, insert SelectRange command for selecting the first cell of the range to be processed






2. Click If & Loop button on Text & Flow & Var group panel, select For item, Input the number of cells to be processed in the Start parameter input box, insert For statement for one by one processing cells





3. Click Range button on Excel macros group panel, select Read cell item, choose a assigned variable, insert ReadCell command for geting a value from the selected cell




4. Click Text button on Text & Flow & Var group panel, select Text strip WS item, choose Left and Right option on Type bar, insert TextStripWS command for removing leading and trailing spaces in the value




5. Click Range button on Excel macros group panel, select Write cell item, insert WriteCell command for writing the processed value into the selected cell




6. Click Row & Column button on Excel macros group panel, select Move row item, insert MoveRow command for moving to the next cell to continue processing




The finished code