oadmhernandez
New Member
- Joined
- Sep 21, 2013
- Messages
- 11
Hello World,
I found the following VBA code here in the forum, however, I'd like to take it one more step.
Sub strip_zero_length_string()
Dim c As Long
With Sheets(ActiveSheet.Name).Cells(1, 1).CurrentRegion
.Cells = .Cells.Value
For c = 1 To .Columns.Count
.Columns(c).TextToColumns Destination:=.Cells(1, c), _
DataType:=xlFixedWidth, FieldInfo:=Array(0, 1)
Next c
End With
End Sub
I'm new to VBA so I don't know how to incorporate the .clear method to clear all formatting.
I need to strip zero length, and clear all formatting on any excel sheet not specific to a range and I'd like to know if there's a way of doing so.
Thank you in advance for your help.
I found the following VBA code here in the forum, however, I'd like to take it one more step.
Sub strip_zero_length_string()
Dim c As Long
With Sheets(ActiveSheet.Name).Cells(1, 1).CurrentRegion
.Cells = .Cells.Value
For c = 1 To .Columns.Count
.Columns(c).TextToColumns Destination:=.Cells(1, c), _
DataType:=xlFixedWidth, FieldInfo:=Array(0, 1)
Next c
End With
End Sub
I'm new to VBA so I don't know how to incorporate the .clear method to clear all formatting.
I need to strip zero length, and clear all formatting on any excel sheet not specific to a range and I'd like to know if there's a way of doing so.
Thank you in advance for your help.