good day to all
is it possible to convert text to columns in differents sheet at the same time ?
I've tried to run below macro
is it possible to convert text to columns in differents sheet at the same time ?
I've tried to run below macro
VBA Code:
Sub Macro1()
For ws = 1 To ThisWorkbook.Sheets.Count
If (ThisWorkbook.Sheets(ws).Name = "EUROMAR-I" Or _
ThisWorkbook.Sheets(ws).Name = "EUROMAR-II" Or _
ThisWorkbook.Sheets(ws).Name = "EUROMAR-III" Or _
ThisWorkbook.Sheets(ws).Name = "MOSHT-I" Or _
ThisWorkbook.Sheets(ws).Name = "MOSHT-II" Or _
ThisWorkbook.Sheets(ws).Name = "MOSHT-III") Then
Application.ScreenUpdating = False
Dim rg As Range
With Worksheets(ThisWorkbook.Sheets(ws).Name)
Set rg = Range("A1").CurrentRegion
rg.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=True, Comma:=True, Space:=False, Other:=False
End With
Application.ScreenUpdating = True
End If
Next ws
End Sub