I am using the code below to trim some \"blank cells\" that contain a space. The thing is it takes too much time, as is looping to every cell. What I want is to remove the spac
Do it on the whole range at once using the array version of Excel's Trim
:
myRange.Value = Application.Trim(myRange.Value)
Using the only variables visible in your code, it would be:
With Range(Cells(1,1), Cells(ScenarioTableLastRow, ScenarioTableLastColumn))
.Value = Application.Trim(.Value)
End With