vba - Why is Rows(i).EntireRow.Delete deleting the cell instead of the row? -


instead of entire row being deleted, cell(i,8) gets deleted. code is, each cell until last row, if cell starts im, highlight it, , if corresponding cell less 4, delete row. thanks

for = 1 lastrow     if left(cells(i, 1), 2) = "im"         cells(i, 1).interior.color = rgb(140, 220, 100)         if cells(i, 8).value <= 4             rows(i).entirerow.delete         end if     end if next 

open immediate window. write these two:

rows(5).entirerow.delete rows(5).delete 

see row 5 gets deleted. code wrong, running else.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -