Function GetNumeric(CellRef As String)
Dim StringLength As Integer
StringLength = Len(CellRef)
For i = 1 To StringLength
If IsNumeric(Mid(CellRef, i, 1)) Then Result = Result & Mid(CellRef, i, 1)
Next i
GetNumeric = Result
End Function
Sub Macro1()
'
' Macro1 Macro
'
'
With ActiveSheet
lastrow = .Cells(.Rows.Count, "B").End(xlUp).Row
For rownum = lastrow To 1 Step -1
If GetNumeric(.Range("B" & rownum).Text) = 2 Then
.Rows(rownum).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End If
Next rownum
End With
End Sub