excel - Using a macro, how do you script to delete 2 columns (T & U) based on Column "N" value? -
i need assistance using vba program macro delete values in columns "t & u" based on column "n" equal "closed".
so simplify this: if column "n" = closed, columns "t" , "u" should have no value.
thanks!
try this:
sub clearer() dim long dim w worksheet dim r range dim r1 long set w = sheet1 'set (name) of sheet. set r = w.usedrange r1 = r.row = r1 r1 + r.rows.count - 1 if w.cells(i, 14) = "closed" w.range(w.cells(i, 20), w.cells(i, 21)).clearcontents next msgbox "done!" end sub
Comments
Post a Comment