I have some code to format a column the way I want and I use similar code multiple times. I was wondering which would run quicker???
detail.Range("S1").FormulaR1C1 = "Unit Cost ($)"
detail.Range("S1").WrapText = True
With detail.Columns("S:S")
.TextToColumns Destination:=Range("S1")
.Style = "Comma"
.AutoFit
End With
or
Range("S1").FormulaR1C1 = "Unit Cost ($)"
Range("S1").WrapText = True
With Columns("S:S")
.TextToColumns Destination:=Range("S1")
.Style = "Comma"
.AutoFit
End With
the only difference is I removed detail from the front of the lines. Detail is the variable name I set to that sheet. I read in one of the articles here that the more periods you have the slower it would run. But I also read that using variables, so excel doesn't have to figure out where is quicker. So which one is quicker?