Une erreur 1004 apparait pour le script suivant. Merci pour votre aide.
Dim Rg As Range
Dim Rg1 As Range
Dim Rg2 As Range
Dim Rg3 As Range
Dim Rg4 As Range
Dim Rg5 As Range
For Each a In ActiveSheet.Range("A1:A10")
'libell=E9 TCD
Set Rg1 =3D ActiveSheet.a.Value
'valeurs TCD
Set Rg =3D ActiveSheet.Cells.Find(Rg1, Lookat:=3DxlWhole)
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then
valeurpourexporttpmc =3D Rg2.Offset(0, 1).Value
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then
valeurpourexportgo =3D Rg2.Offset(0, 2).Value
'emplacement ds la grille
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then
Workbooks(grilledecalculcourt).Sheets("D=E9tails chiffres
bruts").Activate
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Set Rg3 =3D
ActiveSheet.Cells.Find(Rg1, Lookat:=3DxlWhole)
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg4 =3D
Rg3.Offset(0, 1)
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg5 =3D
Rg3.Offset(0, 2)
'import des valeurs
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg4.Value =3D
valeurpourexporttpmc
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg5.Value =3D
valeurpourexportgo
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then
Workbooks(exportwebhsicourt).Sheets("1-Testbed").Activate
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
remige_paralogique
Plutot ça en fait:
Dim Rg As Range Dim Rg1 As Range Dim Rg3 As Range Dim Rg4 As Range Dim Rg5 As Range
For Each a In ActiveSheet.Range("A1:A10")
'libellé TCD Set Rg1 = ActiveSheet.a.Value
'valeurs TCD Set Rg = ActiveSheet.Cells.Find(Rg1, Lookat:=xlWhole) If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then valeurpourexporttpmc = Rg.Offset(0, 1).Value If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then valeurpourexportgo = Rg.Offset(0, 2).Value
'emplacement ds la grille If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Workbooks(grilledecalculcourt).Sheets("Détails chiffres bruts").Activate If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Set Rg3 = ActiveSheet.Cells.Find(Rg1, Lookat:=xlWhole) If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg4 = Rg3.Offset(0, 1) If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg5 = Rg3.Offset(0, 2)
'import des valeurs If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg4.Value = valeurpourexporttpmc If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg5.Value = valeurpourexportgo If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Workbooks(exportwebhsicourt).Sheets("1-Testbed").Activate
Next a
Une erreur 1004 apparait pour le script suivant. Merci pour votre aide.
Dim Rg As Range Dim Rg1 As Range Dim Rg2 As Range Dim Rg3 As Range Dim Rg4 As Range Dim Rg5 As Range
For Each a In ActiveSheet.Range("A1:A10")
'libellé TCD Set Rg1 = ActiveSheet.a.Value
'valeurs TCD Set Rg = ActiveSheet.Cells.Find(Rg1, Lookat:=xlWhole) If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then valeurpourexporttpmc = Rg2.Offset(0, 1).Value If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then valeurpourexportgo = Rg2.Offset(0, 2).Value
'emplacement ds la grille If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Workbooks(grilledecalculcourt).Sheets("Détails chiffres bruts").Activate If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Set Rg3 = ActiveSheet.Cells.Find(Rg1, Lookat:=xlWhole) If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg4 = Rg3.Offset(0, 1) If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg5 = Rg3.Offset(0, 2)
'import des valeurs If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg4.Value = valeurpourexporttpmc If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg5.Value = valeurpourexportgo If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Workbooks(exportwebhsicourt).Sheets("1-Testbed").Activate
Next a
Plutot ça en fait:
Dim Rg As Range
Dim Rg1 As Range
Dim Rg3 As Range
Dim Rg4 As Range
Dim Rg5 As Range
For Each a In ActiveSheet.Range("A1:A10")
'libellé TCD
Set Rg1 = ActiveSheet.a.Value
'valeurs TCD
Set Rg = ActiveSheet.Cells.Find(Rg1, Lookat:=xlWhole)
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then
valeurpourexporttpmc = Rg.Offset(0, 1).Value
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then
valeurpourexportgo = Rg.Offset(0, 2).Value
'emplacement ds la grille
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then
Workbooks(grilledecalculcourt).Sheets("Détails chiffres
bruts").Activate
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Set Rg3 =
ActiveSheet.Cells.Find(Rg1, Lookat:=xlWhole)
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg4 =
Rg3.Offset(0, 1)
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg5 =
Rg3.Offset(0, 2)
'import des valeurs
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg4.Value =
valeurpourexporttpmc
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg5.Value =
valeurpourexportgo
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then
Workbooks(exportwebhsicourt).Sheets("1-Testbed").Activate
Next a
Une erreur 1004 apparait pour le script suivant. Merci pour votre aide.
Dim Rg As Range
Dim Rg1 As Range
Dim Rg2 As Range
Dim Rg3 As Range
Dim Rg4 As Range
Dim Rg5 As Range
For Each a In ActiveSheet.Range("A1:A10")
'libellé TCD
Set Rg1 = ActiveSheet.a.Value
'valeurs TCD
Set Rg = ActiveSheet.Cells.Find(Rg1, Lookat:=xlWhole)
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then
valeurpourexporttpmc = Rg2.Offset(0, 1).Value
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then
valeurpourexportgo = Rg2.Offset(0, 2).Value
'emplacement ds la grille
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then
Workbooks(grilledecalculcourt).Sheets("Détails chiffres
bruts").Activate
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Set Rg3 =
ActiveSheet.Cells.Find(Rg1, Lookat:=xlWhole)
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg4 =
Rg3.Offset(0, 1)
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg5 =
Rg3.Offset(0, 2)
'import des valeurs
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg4.Value =
valeurpourexporttpmc
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg5.Value =
valeurpourexportgo
If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then
Workbooks(exportwebhsicourt).Sheets("1-Testbed").Activate
Dim Rg As Range Dim Rg1 As Range Dim Rg3 As Range Dim Rg4 As Range Dim Rg5 As Range
For Each a In ActiveSheet.Range("A1:A10")
'libellé TCD Set Rg1 = ActiveSheet.a.Value
'valeurs TCD Set Rg = ActiveSheet.Cells.Find(Rg1, Lookat:=xlWhole) If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then valeurpourexporttpmc = Rg.Offset(0, 1).Value If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then valeurpourexportgo = Rg.Offset(0, 2).Value
'emplacement ds la grille If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Workbooks(grilledecalculcourt).Sheets("Détails chiffres bruts").Activate If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Set Rg3 = ActiveSheet.Cells.Find(Rg1, Lookat:=xlWhole) If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg4 = Rg3.Offset(0, 1) If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg5 = Rg3.Offset(0, 2)
'import des valeurs If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg4.Value = valeurpourexporttpmc If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg5.Value = valeurpourexportgo If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Workbooks(exportwebhsicourt).Sheets("1-Testbed").Activate
Next a
Une erreur 1004 apparait pour le script suivant. Merci pour votre aide.
Dim Rg As Range Dim Rg1 As Range Dim Rg2 As Range Dim Rg3 As Range Dim Rg4 As Range Dim Rg5 As Range
For Each a In ActiveSheet.Range("A1:A10")
'libellé TCD Set Rg1 = ActiveSheet.a.Value
'valeurs TCD Set Rg = ActiveSheet.Cells.Find(Rg1, Lookat:=xlWhole) If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then valeurpourexporttpmc = Rg2.Offset(0, 1).Value If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then valeurpourexportgo = Rg2.Offset(0, 2).Value
'emplacement ds la grille If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Workbooks(grilledecalculcourt).Sheets("Détails chiffres bruts").Activate If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Set Rg3 = ActiveSheet.Cells.Find(Rg1, Lookat:=xlWhole) If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg4 = Rg3.Offset(0, 1) If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg5 = Rg3.Offset(0, 2)
'import des valeurs If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg4.Value = valeurpourexporttpmc If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Rg5.Value = valeurpourexportgo If (Not Rg Is Nothing) And (Rg.Value <> "Total") Then Workbooks(exportwebhsicourt).Sheets("1-Testbed").Activate