Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jun 2005
    Posts
    388
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I downloaded a table and there are cells that have spaces before the data. How can I get rid of the spaces and left justify the data. a click on the justify button will not help

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You could run the following macro:

    Code:
    Sub TrimCells()
      Dim oCell As Range
      For Each oCell In ActiveSheet.UsedRange.Cells
    	oCell = Trim(oCell)
      Next oCell
    End Sub
    Warning: don't use this version on a sheet that contains formulas; the code would replace the formulas with their result.

  3. #3
    3 Star Lounger
    Join Date
    Jun 2005
    Posts
    388
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •