98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Deleting Rows were there are formulas that return a nil value
Deleting Rows were there are formulas that return a nil value
Resolved · High Priority · Version 2003
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
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Closing Multiple Workbooks quicklyWhen you have several workbooks open in Excel and want to just close them all at once: |