opazzo
Board Regular
- Joined
- Dec 21, 2005
- Messages
- 69
- Office Version
- 365
- Platform
- Windows
Hi there,
Happy new year to all.
I am using the following code to clean-up cells before processing data. I was wondering if anyone had ideas on how to speed up the code (besides the screenupdating and manual calculation, of course).
Thx
-----
For x = 6 To LastRow
Range("D" & x).Value = Application.WorksheetFunction.Trim(Range("D" & x))
Range("D" & x).Value = Application.WorksheetFunction.Clean(Range("D" & x))
Range("E" & x).Value = Application.WorksheetFunction.Trim(Range("E" & x))
Range("E" & x).Value = Application.WorksheetFunction.Clean(Range("E" & x))
Range("F" & x).Value = Application.WorksheetFunction.Trim(Range("F" & x))
Range("F" & x).Value = Application.WorksheetFunction.Clean(Range("F" & x))
Range("G" & x).Value = Application.WorksheetFunction.Trim(Range("G" & x))
Range("G" & x).Value = Application.WorksheetFunction.Clean(Range("G" & x))
Range("X" & x).Value = Application.WorksheetFunction.Trim(Range("X" & x))
Range("X" & x).Value = Application.WorksheetFunction.Clean(Range("X" & x))
Next
-----
Happy new year to all.
I am using the following code to clean-up cells before processing data. I was wondering if anyone had ideas on how to speed up the code (besides the screenupdating and manual calculation, of course).
Thx
-----
For x = 6 To LastRow
Range("D" & x).Value = Application.WorksheetFunction.Trim(Range("D" & x))
Range("D" & x).Value = Application.WorksheetFunction.Clean(Range("D" & x))
Range("E" & x).Value = Application.WorksheetFunction.Trim(Range("E" & x))
Range("E" & x).Value = Application.WorksheetFunction.Clean(Range("E" & x))
Range("F" & x).Value = Application.WorksheetFunction.Trim(Range("F" & x))
Range("F" & x).Value = Application.WorksheetFunction.Clean(Range("F" & x))
Range("G" & x).Value = Application.WorksheetFunction.Trim(Range("G" & x))
Range("G" & x).Value = Application.WorksheetFunction.Clean(Range("G" & x))
Range("X" & x).Value = Application.WorksheetFunction.Trim(Range("X" & x))
Range("X" & x).Value = Application.WorksheetFunction.Clean(Range("X" & x))
Next
-----