Beginner1200
New Member
- Joined
- Jan 18, 2023
- Messages
- 16
- Office Version
- 2019
- Platform
- Windows
I am whacking to get the code working but only semi. It seems it only goto A6 and not through until A100... I have tried a lot to get in to work!
but nothing will dot as i want it to do. I hope i can get some help to fix my issue
A1 = 100
A2 = 200
A3 = 300
A4 = 400
A5 = 500
A6 = 600
A7.... A100
but nothing will dot as i want it to do. I hope i can get some help to fix my issue
A1 = 100
A2 = 200
A3 = 300
A4 = 400
A5 = 500
A6 = 600
A7.... A100
VBA Code:
Sub SelectingEitherLine1OrLine2()
Dim cell As Range
For Each cell In Range("A6:A100")
If cell.Value <> 300 Then GoTo Line2 Else: GoTo Line1
Line2:
cell.Offset(1).EntireRow.Insert
cell.Offset(1) = 300
Exit For
Next cell
Line1:
End Sub
Last edited by a moderator: