Hi mdmackillop,
Thanks a lot for your help and sorry to bother you again but as suggested by you in I used the code posted by you in post #4 to insert rows and I am facing a issue with the same. the issue is the code inserts 2 rows before J9 and 2 rows after J9 and stops it doesn't do the same exercise for all error formula instances in column J. Any how I want my macro to insert 2 rows only below a error formula row and not above and then should it offset 2 rows from error formula row and select 2 rows and do the formatting same thing needs to be repeated for other instances as well. Following is the code which i am using after modifying.
HTML Code:
Option Explicit
Sub Deleterowswitherrorformulagf()
Dim arr(), i As Long, X As Long
Dim Rng As Range, cel As Range
Range("J1:J" & ActiveSheet.UsedRange.Rows.Count).Select
On Error GoTo exits
Set Rng = Selection.SpecialCells(xlCellTypeFormulas, xlErrors)
ReDim arr(Rng.Cells.Count)
For Each cel In Rng
arr(i) = cel.Row
i = i + 1
Next
For X = i - 1 To 0 Step -1
Cells(arr(X), 1).Resize(2).EntireRow.Insert
Range("A8").Select
Next
exits:
End Sub
As far as formatting is concerned it's working fine. I just need the help on the above thing and then it will be done. Thanks a lot once again for your help.
Thanks a lot for your help in advance.