Sub remonte()
fin = Range("E" & Rows.Count).End(xlUp).Row
Tabloinit = Range("E1:E" & fin).Value
For i = LBound(Tabloinit) To UBound(Tabloinit)
If Tabloinit(i, 1) = "-" Or Tabloinit(i, 1) = "e_mail" Then
Tabloinit(i, 1) = ""
End If
Next i
Range("H1").Resize(fin) = Tabloinit
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Add Key:=Range("H1"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortTextAsNumbers
With ActiveWorkbook.Worksheets("Feuil1").Sort
.SetRange Range("H1:H" & fin)
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Sub remonte()
fin = Range("E" & Rows.Count).End(xlUp).Row
Tabloinit = Range("E1:E" & fin).Value
For i = LBound(Tabloinit) To UBound(Tabloinit)
If Tabloinit(i, 1) = "-" Or Tabloinit(i, 1) = "e_mail" Then
Tabloinit(i, 1) = ""
End If
Next i
Range("E1").Resize(fin) = Tabloinit
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Add Key:=Range("E1"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortTextAsNumbers
With ActiveWorkbook.Worksheets("Feuil1").Sort
.SetRange Range("E1:E" & fin)
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Sub remonte()
fin = Range("E" & Rows.Count).End(xlUp).Row
Tabloinit = Range("E2:E" & fin).Value
For i = LBound(Tabloinit) To UBound(Tabloinit)
If Tabloinit(i, 1) = "-" Then
Tabloinit(i, 1) = ""
End If
Next i
Range("E2").Resize(fin - 1) = Tabloinit
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Add Key:=Range("E2"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortTextAsNumbers
With ActiveWorkbook.Worksheets("Feuil1").Sort
.SetRange Range("E2:E" & fin)
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Sub remonte()
fin = Range("E" & Rows.Count).End(xlUp).Row
Tabloinit = Range("E2:E" & fin).Value
For i = LBound(Tabloinit) To UBound(Tabloinit)
If Tabloinit(i, 1) = "-" Then
Tabloinit(i, 1) = ""
End If
Next i
Range("E2").Resize(fin - 1) = Tabloinit
Range("E2").Resize(fin - 1).Select
Selection.Sort Key1:=Range("E2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
'
'ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Clear
'ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Add Key:=Range("E2"), _
' SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
' xlSortTextAsNumbers
'With ActiveWorkbook.Worksheets("Feuil1").Sort
' .SetRange Range("E2:E" & fin)
' .Header = xlNo
' .MatchCase = False
' .Orientation = xlTopToBottom
' .SortMethod = xlPinYin
' .Apply
'End With
End Sub
Option Explicit
Sub toto()
With Range("e:e")
.Replace What:="-", Replacement:="", LookAt:=xlWhole
.Sort Range("e1"), xlAscending, Header:=xlYes
End With
End Sub
Sub T()
[E:E].Replace "-", ""
[E:E].Sort [E1], , Header:=1
End Sub
Sub T(): [E:E].Replace "-", "": [E:E].Sort [E1], , Header:=1:End Sub
Bon_soir
Bonne idée ÓÒ , mais as-tu oublié que j'étais "par Si… mon yeux" (pas pour le FUN )?
J'ose quand même les … :VB:Sub T() [E:E].Replace "-", "" [E:E].Sort [E1], , Header:=1 End Sub
VB:Sub T(): [E:E].Replace "-", "": [E:E].Sort [E1], , Header:=1:End Sub