Insert desired rows on condition basis
Closed
aijaz_dews
Posts
2
Registration date
Tuesday 24 September 2013
Status
Member
Last seen
24 September 2013
-
24 Sep 2013 à 01:44
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 24 Sep 2013 à 11:47
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 24 Sep 2013 à 11:47
Related:
- Insert desired rows on condition basis
- Insert key on keyboard - Guide
- Insert check mark in word - Guide
- Insert link gmail app - Guide
- Insert emoji in outlook - Guide
- How to insert at the rate in laptop - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
24 Sep 2013 à 11:47
24 Sep 2013 à 11:47
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