benoua
XLDnaute Occasionnel
Bonjour à tous
Dans le code suivant j'aimerai qu'il ne prenne pas la colonne 30 en compte, est ce que vous pouvez m'aider plz, je ne trouve pas le code qu'il faut mettre... :/
Code:
For agregat = 17 To 35
If (line.Columns(agregat) <> 0) Then
target.Cells(indexRow, "A").Value = CodeUR
target.Cells(indexRow, "B").Value = affaire
target.Cells(indexRow, "C").Value = localisation
target.Cells(indexRow, "D").Value = intitule
If (source.Cells(4, agregat) = "Salaires CDI") Then
target.Cells(indexRow, "E").Value = "1"
coefficient = -1
ElseIf (source.Cells(4, agregat) = "Salaires CDD") Then
target.Cells(indexRow, "E").Value = "1"
coefficient = -1
ElseIf (source.Cells(4, agregat) = "Salaires Autres") Then
target.Cells(indexRow, "E").Value = "1"
coefficient = -1
ElseIf (source.Cells(4, agregat) = "Frais d'Expatriation") Then
target.Cells(indexRow, "E").Value = "2"
coefficient = -1
ElseIf (source.Cells(4, agregat) = "Missions") Then
target.Cells(indexRow, "E").Value = "3"
coefficient = -1
ElseIf (source.Cells(4, agregat) = "Fonctionnement") Then
target.Cells(indexRow, "E").Value = "6"
coefficient = -1
ElseIf (source.Cells(4, agregat) = "Co-Traitance") Then
target.Cells(indexRow, "E").Value = "7"
coefficient = -1
ElseIf (source.Cells(4, agregat) = "Autres Charges") Then
target.Cells(indexRow, "E").Value = "9"
coefficient = -1
ElseIf (source.Cells(4, agregat) = "Equipement Propriété Client") Then
target.Cells(indexRow, "E").Value = "4"
coefficient = -1
ElseIf (source.Cells(4, agregat) = "Equipement Propriété Cirad") Then
target.Cells(indexRow, "E").Value = "5"
coefficient = -1
ElseIf (source.Cells(4, agregat) = "Sous-Traitance Interne (inter)") Then
target.Cells(indexRow, "E").Value = "8"
coefficient = -1
ElseIf (source.Cells(4, agregat) = "Sous-Traitance Interne (intra)") Then
target.Cells(indexRow, "E").Value = "16"
coefficient = -1
ElseIf (source.Cells(4, agregat) = "Produits Externes") Then
target.Cells(indexRow, "E").Value = "10"
coefficient = 1
ElseIf (source.Cells(4, agregat) = "Produits Internes (inter)") Then
target.Cells(indexRow, "E").Value = "11"
coefficient = 1
ElseIf (source.Cells(4, agregat) = "Produits Internes (intra)") Then
target.Cells(indexRow, "E").Value = "17"
coefficient = 1
ElseIf (source.Cells(4, agregat) = "Autres Produits") Then
target.Cells(indexRow, "E").Value = "14"
coefficient = 1
Else
target.Cells(indexRow, "E").Value = source.Cells(1, agregat)
coefficient = 1
End If
target.Cells(indexRow, "F") = line.Columns(agregat).Value / 1000 * coefficient
indexRow = indexRow + 1
Dans le code suivant j'aimerai qu'il ne prenne pas la colonne 30 en compte, est ce que vous pouvez m'aider plz, je ne trouve pas le code qu'il faut mettre... :/