Hi guys,
I need assistance in the following two VBAs coding.
This is the excel worksheet that I need help with.
1) This is the current coding that I have for delete(empty cells)
Sub delRowsGO()
Application.ScreenUpdating = False
Dim txtCel As Range
Set txtCel = Columns(2).Find(what:="Supported by SO Finance")
txtCel.Offset(-1).EntireRow.delete
End Sub
I need to enhance the coding whereby it can delete the rows above row(17) and error pop up when it reaches B14:D14? My current coding works, but there's no stop to the deleting rows.
2) Next, Inserting Row Coding.
Sub insertRowsGO()
Dim txtCel As Range
Set txtCel = Columns(2).Find(what:="Supported by SO Finance")
txtCel.Offset(-1).EntireRow.Insert Shift = xlDown, CopyOrigin:=xlFormatFromRightOrAbove
End Sub
This is a little different, when I press insert row, the row inserted is not right above row(17), instead is inserted between current row(15)/(16) and the formal row(16) will escalate down to row(17).
Help is much appreciated. Please and thanks.
I need assistance in the following two VBAs coding.
This is the excel worksheet that I need help with.
1) This is the current coding that I have for delete(empty cells)
Sub delRowsGO()
Application.ScreenUpdating = False
Dim txtCel As Range
Set txtCel = Columns(2).Find(what:="Supported by SO Finance")
txtCel.Offset(-1).EntireRow.delete
End Sub
I need to enhance the coding whereby it can delete the rows above row(17) and error pop up when it reaches B14:D14? My current coding works, but there's no stop to the deleting rows.
2) Next, Inserting Row Coding.
Sub insertRowsGO()
Dim txtCel As Range
Set txtCel = Columns(2).Find(what:="Supported by SO Finance")
txtCel.Offset(-1).EntireRow.Insert Shift = xlDown, CopyOrigin:=xlFormatFromRightOrAbove
End Sub
This is a little different, when I press insert row, the row inserted is not right above row(17), instead is inserted between current row(15)/(16) and the formal row(16) will escalate down to row(17).
Help is much appreciated. Please and thanks.