Re,
Essaye ça :
Function test(NomFich As String, ColStock As String, ColCal As String)
With Sheets(NomFich)
Nb_Ligne_Stocks = .Range(ColStock & Rows.Count).End(xlUp).Row
Nb_Ligne_Calculee = .Range(ColCal & Rows.Count).End(xlUp).Row
If Nb_Ligne_Calculee > Nb_Ligne_Stocks Then
.Range(ColCal & "2:" & ColCal & Nb_Ligne_Calculee).ClearContents
Else
.Range(ColCal & "2:" & ColCal & Nb_Ligne_Stocks).ClearContents
End If
End With
End Function
L'appel de cette fonction se fait par exemple comme ça :
Call test("Rq Stocks", "A", "H")
NB : la prochaine fois évite d'envoyer ton message au complet pour montrer ce qu'il te manque. Quelques lignes suffit pour expliquer .Pense surtout qu'on essaye de te rendre service le plus rapidement possible