Re : Besoin d'aide avec les fonctions svp
Est-ce bon si je procede de cette facon?
Sub CodeGenerique()
Call CodeG("20002", "G30")
Call CodeG("20003", "G31")
Call CodeG("20004", "G32")
Call CodeG("20005", "G33")
Call CodeG("20006", "G34")
Call CodeG("20007", "G35")
Call CodeG("20008", "G36")
Call CodeG("20009", "G37")
Call CodeG("20010", "G38")
Call CodeG("20011", "G39")
Call CodeG("20011", "G31")
Call CodeG("20012", "G32")
Call CodeG("20013", "G33")
Call CodeG("20014", "G34")
Call CodeG("20015", "G35")
Call CodeG("20016", "G36")
Call CodeG("20017", "G37")
Call CodeG("20018", "G38")
Call CodeG("20019", "G39")
Call CodeG("20020", "G38")
Call CodeG("20021", "G39")
Call CodeG("20101", "H30")
Call CodeG("20102", "H31")
Call CodeG("20103", "H32")
Call CodeG("20104", "H33")
Call CodeG("20105", "H34")
Call CodeG("20106", "H35")
Call CodeG("20107", "H36")
Call CodeG("20108", "H37")
Call CodeG("20301", "I30")
Call CodeG("20302", "I31")
Call CodeG("20303", "I32")
Call CodeG("20304", "I33")
Call CodeG("20305", "I34")
Call CodeG("20306", "I35")
Call CodeG("20307", "I36")
Call CodeG("20308", "I37")
Call CodeG("20309", "I38")
Call CodeG("20401", "J30")
Call CodeG("20402", "J31")
Call CodeG("20403", "J32")
Call CodeG("20404", "J33")
Call CodeG("20405", "J34")
Call CodeG("20406", "J35")
Call CodeG("20407", "J36")
Call CodeG("20408", "J37")
Call CodeG("20409", "J38")
Call CodeG("20410", "J39")
Call CodeG("20501", "K30")
Call CodeG("20502", "K31")
Call CodeG("20503", "K32")
Call CodeG("20504", "K33")
Call CodeG("20505", "K34")
Call CodeG("20506", "K35")
Call CodeG("20507", "K36")
Call CodeG("20508", "K37")
Call CodeG("20509", "K38")
Call CodeG("20510", "K39")
Call CodeG("20511", "K40")
Call CodeG("20512", "K41")
Call CodeG("20513", "K42")
Call CodeG("20514", "K43")
Call CodeG("20515", "K44")
Call CodeG("20601", "L30")
Call CodeG("20602", "L31")
Call CodeG("20603", "L32")
Call CodeG("20604", "L33")
Call CodeG("20605", "L34")
Call CodeG("20606", "L35")
Call CodeG("20607", "L36")
Call CodeG("20608", "L37")
Call CodeG("20609", "L38")
Call CodeG("20610", "L39")
Call CodeG("20611", "L40")
Call CodeG("20613", "L41")
Call CodeG("20614", "L42")
Call CodeG("20615", "L43")
Call CodeG("20801", "M30")
Call CodeG("20802", "M31")
Call CodeG("20803", "M32")
Call CodeG("20804", "M33")
Call CodeG("20805", "M34")
Call CodeG("20806", "M35")
Call CodeG("20807", "M36")
End Sub
Sub CodeG(ByRef xx As String, yy As String)
If Left(Sheets("GED").Range("C10"), 5) = xx Then
Cgeneric = Sheets("Choix").Range(yy)
Sheets("Choix").Range(yy) = Sheets("Choix").Range(yy) + 1
Sheets("GED").Range("M10") = Cgeneric
End If
End Sub