1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| Sub FormatGeneralSurColonne()
Application.ScreenUpdating = False
Calcul = Application.Calculation
Application.Calculation = xlCalculationManual
Dim c As Range, MonText As String
If Selection.Cells.Count > 1 Then
Set MaSelection = Intersect(Selection.SpecialCells(xlCellTypeVisible), Range("A1", ActiveSheet.UsedRange))
Else
Set MaSelection = Selection
End If
If MaSelection.Areas.Count = 1 And MaSelection.Columns.Count = 1 Then
MaSelection.TextToColumns Destination:=MaSelection, DataType:=xlDelimited, _
TextQualifier:=xlSingleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1), TrailingMinusNumbers:=True
Else
Msgbox "veuillez sélectionner une seule colonne"
End If
Application.Calculation = Calcul
End Sub |
Partager