Advertisement
Pastebinuser1993

Spaces

Jun 17th, 2023
391
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Sub CommandButton1_Click()
  2.  
  3. Dim mycell As Range Dim myrange As Range
  4.  
  5. Set myrange Worksheets("Extra Space").Range("82:E10")
  6.  
  7. For Each mycell In myrange
  8.  
  9. mycell.Value = Application. WorksheetFunction.Trim(mycell.Value)
  10.  
  11. Next mycell
  12.  
  13. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement