I am trying to run this Sub on an excel sheet, single column, 6559 rows of the same 3 repeating 7 digit numbers, using VBA, but it becomes unresponsive. I am not selecting the entire column, only 6559 rows from one column. There are no formulas. Is this normal? What am I doing wrong?
Sub TrimWhiteSpace ()
Dim rng as Range
Set rng as Selection
For Each cell In rng
cell.Value = Trim(cell)
Next cell
End sub
I have tried using trim as both Trim and Trim$.
i7 8cores 32gb ram SSD. Office365 Desktop.