unknownymous
Board Regular
- Joined
- Sep 19, 2017
- Messages
- 236
- Office Version
- 2016
- Platform
- Windows
Hi Guys,
Can you help me tweak the code below for below table?
<tbody>
</tbody>
-------------------------------------------------------------------
Sub AddRow()
Dim SrchRng As Range, cel As Range
Set SrchRng = Range("B:B")
For Each cel In SrchRng
If InStr(1, cel.Value, "OUTPUT") > 0 Then
cel.Offset(1, 0).EntireRow.Insert
End If
Next cel
End Sub
---------------------------------------------------------------------
The code is working but I wanted to insert a column on the FIRST found "OUTPUT" word in B column and not repetitively add in every word found.
Any help will be much appreciated.
Can you help me tweak the code below for below table?
No | x |
1 | Sean |
2 | |
3 | Output Submitted To Department |
4 | Output Submitted To Deparmnt |
5 | Output Sbmitted To Dpartment |
<tbody>
</tbody>
-------------------------------------------------------------------
Sub AddRow()
Dim SrchRng As Range, cel As Range
Set SrchRng = Range("B:B")
For Each cel In SrchRng
If InStr(1, cel.Value, "OUTPUT") > 0 Then
cel.Offset(1, 0).EntireRow.Insert
End If
Next cel
End Sub
---------------------------------------------------------------------
The code is working but I wanted to insert a column on the FIRST found "OUTPUT" word in B column and not repetitively add in every word found.
Any help will be much appreciated.