Macro excel qui bloque avec un nom de feuille qui change tous les jours
Résolu
queffelec125
Messages postés
5
Date d'inscription
Statut
Membre
Dernière intervention
-
Patrice33740 Messages postés 8561 Date d'inscription Statut Membre Dernière intervention -
Patrice33740 Messages postés 8561 Date d'inscription Statut Membre Dernière intervention -
A voir également:
- Macro excel qui bloque avec un nom de feuille qui change tous les jours
- Telecharger macro convertir chiffre en lettre excel - Télécharger - Tableur
- Feuille de pointage excel - Télécharger - Tableur
- Nombre de jours entre deux dates excel - Guide
- Liste déroulante excel - Guide
- Changer de dns - Guide
6 réponses
Bonjour,
On ne connaît pas ta macro, mais bon s'il y a une seule feuille, on met le numéro de la feuille, c'est tout.
Par exemple ActiveWorkbook.Sheets(1).Select
m@rina
On ne connaît pas ta macro, mais bon s'il y a une seule feuille, on met le numéro de la feuille, c'est tout.
Par exemple ActiveWorkbook.Sheets(1).Select
m@rina
Bonjour,
Sans le code, il est difficile de donner une réponse efficace !
Il y a différentes manières de s'affranchir du nom de la feuille, le plus simple est d'utiliser son index :
Sans le code, il est difficile de donner une réponse efficace !
Il y a différentes manières de s'affranchir du nom de la feuille, le plus simple est d'utiliser son index :
Set MaFeuille = Workbooks("MonClasseur").Worksheets(1)
ma macro bloque à ce niveau :
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False<gras>
Sheets("JT_SACD_PARIS_79182426_181113 (").
Attention, je suis un amateur en macro. Voici le contenu de ma macro :
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Selection.AutoFilter
ActiveSheet.Range("$A$1:$AF$41").AutoFilter Field:=13, Criteria1:="=CB", _
Operator:=xlOr, Criteria2:="=VISA"
ActiveWindow.SmallScroll ToRight:=5
ActiveSheet.Range("$A$1:$AF$41").AutoFilter Field:=20, Criteria1:= _
"CAPTURED"
Rows("3:3").Select
Range("F3").Activate
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("J4").Select
Selection.Copy
Range("J3").Select
ActiveSheet.Paste
Range("M4").Select
Application.CutCopyMode = False
Selection.Copy
Range("M3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "CB"
Range("O4").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-7]>0,RC[-7]/100,"""")"
Range("O4").Select
Selection.Copy
Range("O5:O324").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("O3").Select
ActiveCell.FormulaR1C1 = "=SUBTOTAL(9,RC:R[375]C)"
Range("O3").Select
Selection.ClearContents
ActiveCell.FormulaR1C1 = "=SUM(R[1]C:R[249]C)"
Range("AG1").Select
ActiveCell.FormulaR1C1 = "compte"
Range("AG3").Select
ActiveCell.FormulaR1C1 = "512206"
Range("AH1").Select
ActiveCell.FormulaR1C1 = "sens"
Range("AG4").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-25]>0,450101,"""")"
Range("AG4").Select
Selection.Copy
Range("AG5:AG184").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AH3").Select
ActiveCell.FormulaR1C1 = "si("
Range("O3").Select
Range("AH3").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-19]>0,""C"",""D"")"
Range("AH3").Select
Selection.Copy
Range("AH4:AH218").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AH3").Select
ActiveCell.FormulaR1C1 = "D"
Range("AH4").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-19]>0,""C"","""")"
Range("AH4").Select
Selection.Copy
Selection.End(xlDown).Select
Range("AH218:AH253").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH184").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH149").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH114").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH79").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH44").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH6").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH5:AH254").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AH4").Select
ActiveWindow.LargeScroll ToRight:=-1
Cells.Select
Range("L1").Activate
Selection.Copy
Sheets.Add After:=Sheets(Sheets.Count)
Cells.Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("JT_SACD_PARIS_79182426_181113 (").Select
ActiveSheet.Range("$A$1:$AF$324").AutoFilter Field:=13, Criteria1:="SDD"
Application.CutCopyMode = False
ActiveWindow.SmallScroll ToRight:=20
Rows("8:8").Select
Range("U8").Activate
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
Range("J9").Select
Selection.Copy
Range("J8").Select
ActiveSheet.Paste
Range("AG8").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "512206"
Range("AG9").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-25]>0,""450101"","""")"
Range("AG9").Select
Selection.Copy
Range("AG35:AG390").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AH8").Select
ActiveCell.FormulaR1C1 = "D"
Range("AH9").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-26]>0,""C"","""")"
Range("AH9").Select
Selection.Copy
Range("AH35:AH390").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWindow.LargeScroll ToRight:=-1
Range("M9").Select
Selection.Copy
Range("M8").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll ToRight:=-8
Range("O9").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-7]>0,RC[-7]/100,"""")"
Range("O9").Select
Selection.Copy
Range("O35:O390").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("O8").Select
Selection.FormulaR1C1 = "="
ActiveCell.FormulaR1C1 = "=SUBTOTAL(9,R[1]C:R[374]C)"
Range("O8").Select
ActiveWindow.SmallScroll Down:=-18
Rows("8:330").Select
Range("H8").Activate
Selection.Copy
Sheets("Feuil1").Select
ActiveWindow.SmallScroll Down:=24
Rows("39:39").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False<gras>
Sheets("JT_SACD_PARIS_79182426_181113 (").
Attention, je suis un amateur en macro. Voici le contenu de ma macro :
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Selection.AutoFilter
ActiveSheet.Range("$A$1:$AF$41").AutoFilter Field:=13, Criteria1:="=CB", _
Operator:=xlOr, Criteria2:="=VISA"
ActiveWindow.SmallScroll ToRight:=5
ActiveSheet.Range("$A$1:$AF$41").AutoFilter Field:=20, Criteria1:= _
"CAPTURED"
Rows("3:3").Select
Range("F3").Activate
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("J4").Select
Selection.Copy
Range("J3").Select
ActiveSheet.Paste
Range("M4").Select
Application.CutCopyMode = False
Selection.Copy
Range("M3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "CB"
Range("O4").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-7]>0,RC[-7]/100,"""")"
Range("O4").Select
Selection.Copy
Range("O5:O324").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("O3").Select
ActiveCell.FormulaR1C1 = "=SUBTOTAL(9,RC:R[375]C)"
Range("O3").Select
Selection.ClearContents
ActiveCell.FormulaR1C1 = "=SUM(R[1]C:R[249]C)"
Range("AG1").Select
ActiveCell.FormulaR1C1 = "compte"
Range("AG3").Select
ActiveCell.FormulaR1C1 = "512206"
Range("AH1").Select
ActiveCell.FormulaR1C1 = "sens"
Range("AG4").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-25]>0,450101,"""")"
Range("AG4").Select
Selection.Copy
Range("AG5:AG184").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AH3").Select
ActiveCell.FormulaR1C1 = "si("
Range("O3").Select
Range("AH3").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-19]>0,""C"",""D"")"
Range("AH3").Select
Selection.Copy
Range("AH4:AH218").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AH3").Select
ActiveCell.FormulaR1C1 = "D"
Range("AH4").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-19]>0,""C"","""")"
Range("AH4").Select
Selection.Copy
Selection.End(xlDown).Select
Range("AH218:AH253").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH184").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH149").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH114").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH79").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH44").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH6").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH5:AH254").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AH4").Select
ActiveWindow.LargeScroll ToRight:=-1
Cells.Select
Range("L1").Activate
Selection.Copy
Sheets.Add After:=Sheets(Sheets.Count)
Cells.Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("JT_SACD_PARIS_79182426_181113 (").Select
ActiveSheet.Range("$A$1:$AF$324").AutoFilter Field:=13, Criteria1:="SDD"
Application.CutCopyMode = False
ActiveWindow.SmallScroll ToRight:=20
Rows("8:8").Select
Range("U8").Activate
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
Range("J9").Select
Selection.Copy
Range("J8").Select
ActiveSheet.Paste
Range("AG8").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "512206"
Range("AG9").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-25]>0,""450101"","""")"
Range("AG9").Select
Selection.Copy
Range("AG35:AG390").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AH8").Select
ActiveCell.FormulaR1C1 = "D"
Range("AH9").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-26]>0,""C"","""")"
Range("AH9").Select
Selection.Copy
Range("AH35:AH390").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWindow.LargeScroll ToRight:=-1
Range("M9").Select
Selection.Copy
Range("M8").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll ToRight:=-8
Range("O9").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-7]>0,RC[-7]/100,"""")"
Range("O9").Select
Selection.Copy
Range("O35:O390").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("O8").Select
Selection.FormulaR1C1 = "="
ActiveCell.FormulaR1C1 = "=SUBTOTAL(9,R[1]C:R[374]C)"
Range("O8").Select
ActiveWindow.SmallScroll Down:=-18
Rows("8:330").Select
Range("H8").Activate
Selection.Copy
Sheets("Feuil1").Select
ActiveWindow.SmallScroll Down:=24
Rows("39:39").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub
Bonjour,
As-tu lu les réponses de marina et Patrice?
Voici un peu de lecture pour affranchir le nom de la feuille
https://silkyroad.developpez.com/VBA/FeuilleDeCalcul/
As-tu lu les réponses de marina et Patrice?
Voici un peu de lecture pour affranchir le nom de la feuille
https://silkyroad.developpez.com/VBA/FeuilleDeCalcul/
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Merci à tous pour vos réponses.
N'étant pas informaticien je construis mes macros de la manière suivante :
En fait, je n'écris pas la macro, mais elle enregistre mes actions c'est pourquoi il y a certainement du nettoyage à faire.
Mais mon problème demeure, les différentes réponses ne me permettent pas de lancer ma macro.
Mon problème apparait à ce niveau :
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("JT_SACD_PARIS_79182426_181113 (").Select
Par quoi faut-il remplacer "JT_SACD_PARIS_79182426_181113" pour que la macro ne se bloque pas chaque jour alors que le nom de la feuille est chaque jour différent ?
Je remets ci-dessous ma macro et si quelqu'un peut m'aider, d'avance merci :
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Selection.AutoFilter
ActiveSheet.Range("$A$1:$AF$41").AutoFilter Field:=13, Criteria1:="=CB", _
Operator:=xlOr, Criteria2:="=VISA"
ActiveWindow.SmallScroll ToRight:=5
ActiveSheet.Range("$A$1:$AF$41").AutoFilter Field:=20, Criteria1:= _
"CAPTURED"
Rows("3:3").Select
Range("F3").Activate
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("J4").Select
Selection.Copy
Range("J3").Select
ActiveSheet.Paste
Range("M4").Select
Application.CutCopyMode = False
Selection.Copy
Range("M3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "CB"
Range("O4").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-7]>0,RC[-7]/100,"""")"
Range("O4").Select
Selection.Copy
Range("O5:O324").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("O3").Select
ActiveCell.FormulaR1C1 = "=SUBTOTAL(9,RC:R[375]C)"
Range("O3").Select
Selection.ClearContents
ActiveCell.FormulaR1C1 = "=SUM(R[1]C:R[249]C)"
Range("AG1").Select
ActiveCell.FormulaR1C1 = "compte"
Range("AG3").Select
ActiveCell.FormulaR1C1 = "512206"
Range("AH1").Select
ActiveCell.FormulaR1C1 = "sens"
Range("AG4").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-25]>0,450101,"""")"
Range("AG4").Select
Selection.Copy
Range("AG5:AG184").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AH3").Select
ActiveCell.FormulaR1C1 = "si("
Range("O3").Select
Range("AH3").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-19]>0,""C"",""D"")"
Range("AH3").Select
Selection.Copy
Range("AH4:AH218").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AH3").Select
ActiveCell.FormulaR1C1 = "D"
Range("AH4").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-19]>0,""C"","""")"
Range("AH4").Select
Selection.Copy
Selection.End(xlDown).Select
Range("AH218:AH253").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH184").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH149").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH114").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH79").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH44").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH6").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH5:AH254").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AH4").Select
ActiveWindow.LargeScroll ToRight:=-1
Cells.Select
Range("L1").Activate
Selection.Copy
Sheets.Add After:=Sheets(Sheets.Count)
Cells.Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("JT_SACD_PARIS_79182426_181113 (").Select
ActiveSheet.Range("$A$1:$AF$324").AutoFilter Field:=13, Criteria1:="SDD"
Application.CutCopyMode = False
ActiveWindow.SmallScroll ToRight:=20
Rows("8:8").Select
Range("U8").Activate
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
Range("J9").Select
Selection.Copy
Range("J8").Select
ActiveSheet.Paste
Range("AG8").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "512206"
Range("AG9").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-25]>0,""450101"","""")"
Range("AG9").Select
Selection.Copy
Range("AG35:AG390").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AH8").Select
ActiveCell.FormulaR1C1 = "D"
Range("AH9").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-26]>0,""C"","""")"
Range("AH9").Select
Selection.Copy
Range("AH35:AH390").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWindow.LargeScroll ToRight:=-1
Range("M9").Select
Selection.Copy
Range("M8").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll ToRight:=-8
Range("O9").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-7]>0,RC[-7]/100,"""")"
Range("O9").Select
Selection.Copy
Range("O35:O390").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("O8").Select
Selection.FormulaR1C1 = "="
ActiveCell.FormulaR1C1 = "=SUBTOTAL(9,R[1]C:R[374]C)"
Range("O8").Select
ActiveWindow.SmallScroll Down:=-18
Rows("8:330").Select
Range("H8").Activate
Selection.Copy
Sheets("Feuil1").Select
ActiveWindow.SmallScroll Down:=24
Rows("39:39").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub
N'étant pas informaticien je construis mes macros de la manière suivante :
En fait, je n'écris pas la macro, mais elle enregistre mes actions c'est pourquoi il y a certainement du nettoyage à faire.
Mais mon problème demeure, les différentes réponses ne me permettent pas de lancer ma macro.
Mon problème apparait à ce niveau :
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("JT_SACD_PARIS_79182426_181113 (").Select
Par quoi faut-il remplacer "JT_SACD_PARIS_79182426_181113" pour que la macro ne se bloque pas chaque jour alors que le nom de la feuille est chaque jour différent ?
Je remets ci-dessous ma macro et si quelqu'un peut m'aider, d'avance merci :
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Selection.AutoFilter
ActiveSheet.Range("$A$1:$AF$41").AutoFilter Field:=13, Criteria1:="=CB", _
Operator:=xlOr, Criteria2:="=VISA"
ActiveWindow.SmallScroll ToRight:=5
ActiveSheet.Range("$A$1:$AF$41").AutoFilter Field:=20, Criteria1:= _
"CAPTURED"
Rows("3:3").Select
Range("F3").Activate
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("J4").Select
Selection.Copy
Range("J3").Select
ActiveSheet.Paste
Range("M4").Select
Application.CutCopyMode = False
Selection.Copy
Range("M3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "CB"
Range("O4").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-7]>0,RC[-7]/100,"""")"
Range("O4").Select
Selection.Copy
Range("O5:O324").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("O3").Select
ActiveCell.FormulaR1C1 = "=SUBTOTAL(9,RC:R[375]C)"
Range("O3").Select
Selection.ClearContents
ActiveCell.FormulaR1C1 = "=SUM(R[1]C:R[249]C)"
Range("AG1").Select
ActiveCell.FormulaR1C1 = "compte"
Range("AG3").Select
ActiveCell.FormulaR1C1 = "512206"
Range("AH1").Select
ActiveCell.FormulaR1C1 = "sens"
Range("AG4").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-25]>0,450101,"""")"
Range("AG4").Select
Selection.Copy
Range("AG5:AG184").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AH3").Select
ActiveCell.FormulaR1C1 = "si("
Range("O3").Select
Range("AH3").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-19]>0,""C"",""D"")"
Range("AH3").Select
Selection.Copy
Range("AH4:AH218").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AH3").Select
ActiveCell.FormulaR1C1 = "D"
Range("AH4").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-19]>0,""C"","""")"
Range("AH4").Select
Selection.Copy
Selection.End(xlDown).Select
Range("AH218:AH253").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH184").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH149").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH114").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH79").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH44").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH6").Select
ActiveWindow.LargeScroll Down:=-1
Range("AH5:AH254").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AH4").Select
ActiveWindow.LargeScroll ToRight:=-1
Cells.Select
Range("L1").Activate
Selection.Copy
Sheets.Add After:=Sheets(Sheets.Count)
Cells.Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("JT_SACD_PARIS_79182426_181113 (").Select
ActiveSheet.Range("$A$1:$AF$324").AutoFilter Field:=13, Criteria1:="SDD"
Application.CutCopyMode = False
ActiveWindow.SmallScroll ToRight:=20
Rows("8:8").Select
Range("U8").Activate
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
Range("J9").Select
Selection.Copy
Range("J8").Select
ActiveSheet.Paste
Range("AG8").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "512206"
Range("AG9").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-25]>0,""450101"","""")"
Range("AG9").Select
Selection.Copy
Range("AG35:AG390").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AH8").Select
ActiveCell.FormulaR1C1 = "D"
Range("AH9").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-26]>0,""C"","""")"
Range("AH9").Select
Selection.Copy
Range("AH35:AH390").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWindow.LargeScroll ToRight:=-1
Range("M9").Select
Selection.Copy
Range("M8").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll ToRight:=-8
Range("O9").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-7]>0,RC[-7]/100,"""")"
Range("O9").Select
Selection.Copy
Range("O35:O390").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("O8").Select
Selection.FormulaR1C1 = "="
ActiveCell.FormulaR1C1 = "=SUBTOTAL(9,R[1]C:R[374]C)"
Range("O8").Select
ActiveWindow.SmallScroll Down:=-18
Rows("8:330").Select
Range("H8").Activate
Selection.Copy
Sheets("Feuil1").Select
ActiveWindow.SmallScroll Down:=24
Rows("39:39").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub
merci à tous pour vos réponses.
Je n'ai pas pu les mettre en application car vos réponses s'adressent à un spécialiste que je ne suis pas. Toutefois, en effectuant de nouvelles recherches sur internet j'ai trouvé une autre solution avec la fonction excel "filtre textuel" ou "filtre numérique".
Encore merci
Je n'ai pas pu les mettre en application car vos réponses s'adressent à un spécialiste que je ne suis pas. Toutefois, en effectuant de nouvelles recherches sur internet j'ai trouvé une autre solution avec la fonction excel "filtre textuel" ou "filtre numérique".
Encore merci