Chris L
New Member
I have a large worksheet that the first column is time HH:MM:SS in 30 second increments.
I sort through all this and return 4 hours worth of data at a 15 minute interval and a final row.
The following was given to me when I wanted to look at the last two rows and if only the seconds were different delete row 18
>>> use code - tags <<<
Right now if both rows are empty I get a debugging error and have to manually jump past this code.
Can I add something to ignore this if cells are empty?
I sort through all this and return 4 hours worth of data at a 15 minute interval and a final row.
The following was given to me when I wanted to look at the last two rows and if only the seconds were different delete row 18
>>> use code - tags <<<
Code:
Rows("18:19").Select
With [A1].CurrentRegion.Rows
If Left(.Cells(.Count - 1, 1).Text, 5) = Left(.Cells(.Count, 1).Text, 5) Then .Item(.Count - 1).Delete
End With
Can I add something to ignore this if cells are empty?
Last edited by a moderator: