About the row of Excel deletion

xiaoxiao2021-03-06  74

Some people have discussed in Excel to delete in Excel: Application.ScreenupDating = false j = range ("a4000"). End (xlup) .row i = 1 for a = 1 to j rows i) .select if application.counta (selection.Rows) = 0 Then selection.Rows.delete I = i - 1 end if i = i 1 next a application.screenupdating = true, if I want to delete the line is not all What should I do with the value of each line of the first column?

Rogersfeng Try SUB Test () DIM I as Long, J AS Integerdim Pt as RangeApplication.screenupDating = falsei = Activesheet.Range ("A65536"). End (xlup) .rowfor J = I to 1 Step -1 set Pt = ActiveSheet .Cells (j, 1) if pt = "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""

Here: "Type does not match" I want DIM PT AS RANGE, then if pt = "" "The pt.entreamow.delete should be the value of IF PT =" "" "" "" "" "" " But I tried if pt.vaule = "" Then Pt.ntirelow.delete, it still prompt: "Type does not match"

Change IF PT = "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""

转载请注明原文地址:https://www.9cbs.com/read-121729.html

New Post(0)