Deleting formula in cell if sum is 0

  • Thread starter Thread starter Aloysicus
  • Start date Start date
A

Aloysicus

Hi,

Was wondering if there is a macro which would be able to identify that the
sum of 2 cells is 0 and therefore deleting the formula?

Any help would be greatly appreciated
 
Something like

Sub Test()
Dim cell As Range

For Each cell In ActiveSheet.UsedRange
If cell.HasFormula Then
If cell.Value = 0 Then
cell.Value = ""
End If
End If
Next cell
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top