Nanogirl21
Active Member
- Joined
- Nov 19, 2013
- Messages
- 331
- Office Version
- 365
- Platform
- Windows
I am using this code.
How can I apply it to all worksheets in the active workbook? If there is ever an error it should skip to the next worksheet.
I'd like to be able to use the general format for furture codes that I may need.
Thank you!
Code:
Sub CleanUp()
With ActiveSheet.UsedRange
.Value = Evaluate("if({1},trim(clean(substitute(" & .Address & ",char(160),"" ""))))")
End With
ActiveSheet.UsedRange
End Sub
How can I apply it to all worksheets in the active workbook? If there is ever an error it should skip to the next worksheet.
I'd like to be able to use the general format for furture codes that I may need.
Thank you!