i have a macro to clear all data from row 2 in the sum of the values in Col D sums to zero
![]()
Sub Deletevalues_SummingtoZero() Dim LR As Long, i As Long LR = Cells(Rows.Count, 1).End(xlUp).Row For i = LR To 2 Step -1 If Application.Sum(Cells(LR, 4)) = 0 Then Rows(LR).clearcontents End If Next End Sub
when running the macro the data is not being cleared even though the total values sums to zero
It would be appreciated if someone could kindly amend my code
Bookmarks