- ici dans mon exemple on a la ligne cellule puis 3 lignes à traiter mais le
tableau complet comprend des centaines de fois cette configuration avec des
nombres de lignes à traiter qui changent (donc pas toujours 3 comme ici)
- je veux copier la cellule dans les plages_vides en face du texte avec une
petite macro (en boucle évidemment)
quand j'enregistre la macro et que je l'exécute, ça foire + il y a des
instructions que je ne comprends pas... la macro :
Selection.Copy <<< JE SUIS POSITIONNE SUR LA 1E CELLULE ET JE LA COPIE
ActiveCell.Offset(0, 1).Range("A1").Select <<< JE ME DEPLACE VERS LA
DROITE MAIS CE A1 DANS LA MACRO M'ENERVE
Selection.End(xlDown).Select <<< JE SAUTE DANS LA 2E COL. SUR LA 1E LIGNE
Range(Selection, Selection.End(xlDown)).Select <<< J'IDENTIFIE LE NB DE
LIGNE CONCERNEES
Range(Selection, Selection.End(xlToLeft)).Select <<< JE ME DEPLACE A
GAUCHE TOUT EN MAINTENANT LA SELECTION
ActiveCell.Offset(0, -1).Range("A1:A5").Select <<< L'ENDROIT OU JE VAIS
COPIER MA FORMULE; LE A1:A5 M'ENERVE PUISQUE LA GRANDEUR DE LA ZONE VA ETRE
CHANGEANTE ; LA MACRO SE BLOQUE DE TOUTE FACON ICI
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False <<< COPIER LA CELLULE
>>> ENSUITE J'AI DES LIGNES DE DEPLACEMENT DANS LE TABLEAU QUI 1) SUPPRIME LA LIGNE CELLULE ET SE POSITIONNE SUR LA SUIVANTE
ActiveCell.Select
Application.CutCopyMode = False
Selection.End(xlUp).Select
ActiveCell.Range("A1:F1").Select
Selection.ClearContents
ActiveCell.Select
Selection.End(xlDown).Select
Selection.End(xlDown).Select
Selection.End(xlDown).Select
je pige rien, à l'aide, j'ai cherché pas trouvé... ai pas trouvé comment se
débarasser de ces a1:a5 qui sont variables chez moi !
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
Gloops
Hum, pour ma part, j'ai du mal à comprendre, donc ça fait que si je finis par comprendre quelque chose, je crains de taper à côté ... _______________________________________ Le 14/08/2006 09:29, kernitou a écrit :
- ici dans mon exemple on a la ligne cellule puis 3 lignes à traiter mais le tableau complet comprend des centaines de fois cette configuration avec des nombres de lignes à traiter qui changent (donc pas toujours 3 comme ici) - je veux copier la cellule dans les plages_vides en face du texte avec une petite macro (en boucle évidemment)
quand j'enregistre la macro et que je l'exécute, ça foire + il y a des instructions que je ne comprends pas... la macro :
Selection.Copy <<< JE SUIS POSITIONNE SUR LA 1E CELLULE ET JE LA COPIE ActiveCell.Offset(0, 1).Range("A1").Select <<< JE ME DEPLACE VERS LA DROITE MAIS CE A1 DANS LA MACRO M'ENERVE Selection.End(xlDown).Select <<< JE SAUTE DANS LA 2E COL. SUR LA 1E LIGNE Range(Selection, Selection.End(xlDown)).Select <<< J'IDENTIFIE LE NB DE LIGNE CONCERNEES Range(Selection, Selection.End(xlToLeft)).Select <<< JE ME DEPLACE A GAUCHE TOUT EN MAINTENANT LA SELECTION ActiveCell.Offset(0, -1).Range("A1:A5").Select <<< L'ENDROIT OU JE VAIS COPIER MA FORMULE; LE A1:A5 M'ENERVE PUISQUE LA GRANDEUR DE LA ZONE VA ETRE CHANGEANTE ; LA MACRO SE BLOQUE DE TOUTE FACON ICI Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :úlse, Transpose:úlse <<< COPIER LA CELLULE
ENSUITE J'AI DES LIGNES DE DEPLACEMENT DANS LE TABLEAU QUI 1) SUPPRIME LA LIGNE CELLULE ET SE POSITIONNE SUR LA SUIVANTE
je pige rien, à l'aide, j'ai cherché pas trouvé... ai pas trouvé comment se débarasser de ces a1:a5 qui sont variables chez moi !
merci d'avance
Hum, pour ma part, j'ai du mal à comprendre, donc ça fait que si je
finis par comprendre quelque chose, je crains de taper à côté ...
_______________________________________
Le 14/08/2006 09:29, kernitou a écrit :
- ici dans mon exemple on a la ligne cellule puis 3 lignes à traiter mais le
tableau complet comprend des centaines de fois cette configuration avec des
nombres de lignes à traiter qui changent (donc pas toujours 3 comme ici)
- je veux copier la cellule dans les plages_vides en face du texte avec une
petite macro (en boucle évidemment)
quand j'enregistre la macro et que je l'exécute, ça foire + il y a des
instructions que je ne comprends pas... la macro :
Selection.Copy <<< JE SUIS POSITIONNE SUR LA 1E CELLULE ET JE LA COPIE
ActiveCell.Offset(0, 1).Range("A1").Select <<< JE ME DEPLACE VERS LA
DROITE MAIS CE A1 DANS LA MACRO M'ENERVE
Selection.End(xlDown).Select <<< JE SAUTE DANS LA 2E COL. SUR LA 1E LIGNE
Range(Selection, Selection.End(xlDown)).Select <<< J'IDENTIFIE LE NB DE
LIGNE CONCERNEES
Range(Selection, Selection.End(xlToLeft)).Select <<< JE ME DEPLACE A
GAUCHE TOUT EN MAINTENANT LA SELECTION
ActiveCell.Offset(0, -1).Range("A1:A5").Select <<< L'ENDROIT OU JE VAIS
COPIER MA FORMULE; LE A1:A5 M'ENERVE PUISQUE LA GRANDEUR DE LA ZONE VA ETRE
CHANGEANTE ; LA MACRO SE BLOQUE DE TOUTE FACON ICI
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:úlse, Transpose:úlse <<< COPIER LA CELLULE
ENSUITE J'AI DES LIGNES DE DEPLACEMENT DANS LE TABLEAU QUI 1) SUPPRIME LA LIGNE CELLULE ET SE POSITIONNE SUR LA SUIVANTE
Hum, pour ma part, j'ai du mal à comprendre, donc ça fait que si je finis par comprendre quelque chose, je crains de taper à côté ... _______________________________________ Le 14/08/2006 09:29, kernitou a écrit :
- ici dans mon exemple on a la ligne cellule puis 3 lignes à traiter mais le tableau complet comprend des centaines de fois cette configuration avec des nombres de lignes à traiter qui changent (donc pas toujours 3 comme ici) - je veux copier la cellule dans les plages_vides en face du texte avec une petite macro (en boucle évidemment)
quand j'enregistre la macro et que je l'exécute, ça foire + il y a des instructions que je ne comprends pas... la macro :
Selection.Copy <<< JE SUIS POSITIONNE SUR LA 1E CELLULE ET JE LA COPIE ActiveCell.Offset(0, 1).Range("A1").Select <<< JE ME DEPLACE VERS LA DROITE MAIS CE A1 DANS LA MACRO M'ENERVE Selection.End(xlDown).Select <<< JE SAUTE DANS LA 2E COL. SUR LA 1E LIGNE Range(Selection, Selection.End(xlDown)).Select <<< J'IDENTIFIE LE NB DE LIGNE CONCERNEES Range(Selection, Selection.End(xlToLeft)).Select <<< JE ME DEPLACE A GAUCHE TOUT EN MAINTENANT LA SELECTION ActiveCell.Offset(0, -1).Range("A1:A5").Select <<< L'ENDROIT OU JE VAIS COPIER MA FORMULE; LE A1:A5 M'ENERVE PUISQUE LA GRANDEUR DE LA ZONE VA ETRE CHANGEANTE ; LA MACRO SE BLOQUE DE TOUTE FACON ICI Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :úlse, Transpose:úlse <<< COPIER LA CELLULE
ENSUITE J'AI DES LIGNES DE DEPLACEMENT DANS LE TABLEAU QUI 1) SUPPRIME LA LIGNE CELLULE ET SE POSITIONNE SUR LA SUIVANTE