excel - Add a (second) condition to delete empty rows from a table -



excel - Add a (second) condition to delete empty rows from a table -

with help of code of pnrao @ analysistabs, found how delete blank rows in table (listobject; code below). however, have 1 column in table holds default 0,00 value (it calculated numeric field) , want remove empty rows if column row holds value (i.e. 0,00).

so, code remove rows when clear value in column (@totaal). how add together condition?

dim icntr long dim rng range set rng = activesheet.listobjects("declaratiespecificatie").range icntr = rng.row + rng.rows.count - 1 rng.row step -1 if application.worksheetfunction.counta(rows(icntr)) = 0 rows(icntr).entirerow.delete next

resolved when setting .range .databodyrange in

set rng = activesheet.listobjects("declaratiespecificatie").databodyrange

excel vba excel-vba

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -