Mona has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course
Deleting Rows were there are formulas that return a nil value
How do you write a code which deletes rows where the row contains formulas which returns a nil value.
RE: Deleting Rows were there are formulas that return a nil valu
Hi Mona
Thanks for the question.
I am assuming the values you are wanting to check are in known columns. For my simple example I am assuming the formula is in the B column and my data starts in row one and stops when the formulas stop.
Range("B1").Select
Do Until Activecell.Formula=""
If Activecell.Value=vbNullString Then
Activecell.Entirerow.Delete
Else
ActiveCell.Offset(1,0).Select
End If
Loop
Let me know if that helps.
Laura GB