excel vba - VBA code to delete a row based on a non empty cell in a column -


I am running a report of employees who take time on different codes In the report, I get the following columns: < If the employee has been left / p>

Emp # / amp name / rate / termaid

, then there is a value in the Term Dat column.

Because the value in the cell can be any date, I want to write a macro that will be able to search the list and delete the row in which the value of the fourth column is not empty.

I 'on the basis of empty cells, how to delete a line, or on the basis of certain values, but many instances of none at any blank value have been found.

Each report will also contain a different number of rows, depending on the value of the last column, I need help selecting the range in the range and removing the rows.

Fastest way. Use the .ofofofter no need for loop ...

  sub-sample () Dim LRow with this working book Long Dim Dellange in the form of. Sheet ("Sheet1") '~~ & gt; Remove any filter. AutoFilterMode = False LRow =. ("D" and .rows.Count). End (xlUp) .Row with Range ("A1: D" and LRow). Autofilter field: = 4, Criteria1: = " & gt; Set delRange =. Offset (1, 0). Special Kekel (XLSL type viable). '~ ~ & Gt; Remove any filter. AutoFilterMode = If not finished with error, then nothing delreange.Delete End Sub  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -