PIsabel
Board Regular
- Joined
- Feb 4, 2014
- Messages
- 121
- Office Version
- 365
- Platform
- Windows
Hello.
I have this code to insert blank lines.
How can I indicate the size of the line when it is inserted?
I have this code to insert blank lines.
How can I indicate the size of the line when it is inserted?
VBA Code:
Sub blankrow
'insere linhas brancas
Dim Col As Variant
Dim BlankRows As Long
Dim LastRow As Long
Dim R As Long
Dim StartRow As Long
Col = "x"
StartRow = 1
BlankRows = 1
LastRow = Cells(Rows.Count, Col).End(xlUp).Row
Application.ScreenUpdating = False
With ActiveSheet
For R = LastRow To StartRow + 1 Step -1
If .Cells(R, Col) = "Diferente" Then
.Cells(R, Col).EntireRow.Insert Shift:=xlDown
End If
Next R
End With
Application.ScreenUpdating = True
End sub