Insert desired rows on condition basis
Closed
aijaz_dews
Posts
2
Registration date
Tuesday September 24, 2013
Status
Member
Last seen
September 24, 2013
-
Sep 24, 2013 at 01:44 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Sep 24, 2013 at 11:47 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Sep 24, 2013 at 11:47 AM
Related:
- Insert desired rows on condition basis
- Insert key on laptop - Guide
- Insert draft watermark in word on all pages - Guide
- Insert checkmark in word - Guide
- How to insert photo in word for resume - Guide
- How to insert @ on a laptop - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
552
Sep 24, 2013 at 11:47 AM
Sep 24, 2013 at 11:47 AM
Welcome to Kioskea Aijaz!
See if this code meets your requirements:
Best regards,
Trowa
See if this code meets your requirements:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim x, y As Integer
If Intersect(Target, Columns("B:B")) Is Nothing Then Exit Sub
If Target.Cells.Count > 1 Then Exit Sub
If Target.Value = "SP" _
Or Target.Value = "DYSP" _
Or Target.Value = "Inspr" Then 'add as much values as desired
x = InputBox("How many rows would you like to insert")
y = 0
Do
Target.Insert
y = y + 1
Loop Until x = y
End If
End Sub
Best regards,
Trowa