Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Inserer un certain nombre de lignes

2 réponses
Avatar
PST
Re
NBligne=10

Comment inserer un certain nombre de lignes vides,sous toutes les lignes
non vides de la colonne A

Ligne 1
Ajouter 10 lignes
ligne 2
ajouter 10 lignes

etc...


merci

2 réponses

Avatar
FFO
Salut PST

Soit manuellement :
Selection de la ligne 2 ou 3
Insertion/Lignes
à faire 10 fois
Soit par Macro avec l'instruction :
Rows("2:2").Select ou Rows("3:3").Select
Selection.Insert Shift:=xlDown
A répeter 10 fois

Espérant avoir répondu à ton attente

Re
NBligne

Comment inserer un certain nombre de lignes vides,sous toutes les lignes
non vides de la colonne A

Ligne 1
Ajouter 10 lignes
ligne 2
ajouter 10 lignes

etc...


merci



Avatar
PST
merci

Mais trouvé ce que je voulaissi ça sert à quelqu'un
ce n'est pas de moi, la première il y le nom du mvp, la deuxièm e ?

Insère une 10 lignes vides après chaque ligne non vide

Sub InsertRows()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim r As Long
r = Cells(Rows.Count, "A").End(xlUp).Row
numRows = 10
For r = r To 1 Step -1
ActiveSheet.Rows(r + 1).Resize(numRows).Insert
Next r
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP


2 ème réponse







Insère une ligne vide toutes les lignes non vides


here is something that might help. paste this code in a standard module a nd
run it.

Sub InsertRows_2()

Dim r1 As Range
Dim r2 As Range

Range("A6").Select
Set r1 = Range("A6") 'assuming you have a header row
Do While Not IsEmpty(r1)
Set r2 = r1.Offset(4, 0)
ActiveCell.EntireRow.Insert
r1.Offset(4, 0).Select
Set r1 = r2
Loop

End Sub



Salut PST

Soit manuellement :
Selection de la ligne 2 ou 3
Insertion/Lignes
à faire 10 fois
Soit par Macro avec l'instruction :
Rows("2:2").Select ou Rows("3:3").Select
Selection.Insert Shift:=xlDown
A répeter 10 fois

Espérant avoir répondu à ton attente

Re
NBligne

Comment inserer un certain nombre de lignes vides,sous toutes les lign es
non vides de la colonne A

Ligne 1
Ajouter 10 lignes
ligne 2
ajouter 10 lignes

etc...


merci