Dim DerLigA As Long
DerLigA = Cells(Rows.Count, 1).End(xlUp).Row
Dim DerLigK As String
DerLigK = Cells(Rows.Count, 9).End(xlUp).Row.......................... dans cette colonne 9 (I) a la ligne 13 je n'est q'un chiffre et la sa marche pas mais si jai un chiffre en ligne 13,14,15,... dans la colonne I (9) sa marche.
'tarif trajet
Range("H13").Select
ActiveCell.FormulaR1C1 = "=IFERROR(VLOOKUP(RC[-1],trajet,2,FALSE),"""")"
Range("H13").Select
Selection.AutoFill Destination:=Range("H13:H" & DerLigK & ""), Type:=xlFillDefault
Range("H13:H" & DerLigK & "").Select
'Nombre de jour dans la semaine
Range("J13").Select
ActiveCell.FormulaR1C1 = "=COUNTIF(R13C1:R" & DerLigA & "C1,RC[-1])"
Range("J13").Select
Selection.AutoFill Destination:=Range("J13:J" & DerLigK & ""), Type:=xlFillDefault
Range("J13:J" & DerLigK & "").Select
Partager