string - Macro in Excel to remove rows containing all 0's -
okay here table set i'm working with:

i need macro remove rows containing 4 0's, way can think of @ moment requires cells empty, i.e. ""
does 0 count string or digit or equivalent "" ?
i think problem might related fact of 0's text strings , others numbers, didn't think matter.
try small macro.....it examines sum of section of each row:
sub rowkiller() dim n long, long, wf worksheetfunction dim rng range n = cells(rows.count, "a").end(xlup).row set wf = application.worksheetfunction = n 2 step -1 set rng = range(cells(i, 1), cells(i, 4)) if wf.sum(rng) = 0 rng.entirerow.delete end if next end sub
Comments
Post a Comment