www.EXCELITEMS.com

April 15, 2009

Remove Extra Spaces from a Cell Value – Text VBA Macro

Filed under: Text, VBA Macro — ashishjain @ 7:00 pm

Left Trim
Description: This module will remove extra spaces from left side of selected cells. For e.g if a cell value is ”    excel    “ then after running the macro it will become “excel    “. (Notice spaces from left side has been removed.)

View VBA Macro Code Here


Right Trim
Description:This module will remove extra spaces from right side of selected cells. For e.g if a cell value is ”      excel   “ then after running the macro it will become ”     excel”. (Notice spaces from right side has been removed.)

View VBA Macro Code Here 


 Trim from Both sides
Description:This module will remove extra spaces from both sides of selected cells. For e.g if a cell value is ”      excel   “ then after running the macro it will become “excel”. (Notice spaces from both sides has been removed.)
View VBA Macro Code Here


Remove Extra Excessive Spaces
Description:This module will remove extra spaces from both sides and from inside the selected cells. For e.g if a cell value is ”      excel       items   “ then after running the macro it will become “excel items”. (Notice spaces from left , right and between excel and items words has been removed.)
View VBA Macro Code Here 


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Create a free website or blog at WordPress.com.