auzanoo
Board Regular
- Joined
- Jan 6, 2020
- Messages
- 63
- Office Version
- 2007
- Platform
- Windows
dear expert,
i have a data and code, but it's failed.
from this:
should be this:
so, the time should continue from one to another one.
but, the result is like this:
this is my code,
and i want to add exceptional:
if the time is not so far (around 1 or 2 minutes), then dont delete the row.
for example,
from this:
to this:
i dont know what to do with this one.
thanks in advance!
i have a data and code, but it's failed.
from this:
GOPI | 09:29-12:00 |
TOPIK TERKINI | 10:26-10:27 |
TOPIK TERKINI | 11:45-11:47 |
BEPANNAH(R) | 12:00-14:00 |
should be this:
GOPI | 09:29-12:00 |
BEPANNAH(R) | 12:00-14:00 |
so, the time should continue from one to another one.
but, the result is like this:
GOPI | 09:29-12:00 |
TOPIK TERKINI | 11:45-11:47 |
this is my code,
VBA Code:
Sub DeleteRowswithSpecificValue()
Blank = Range("A1", Range("A1").End(xlDown)).Rows.Count
For i = 1 To Blank
If Right(Cells(i, 2),5) <> Left(Cells(i+1, 2),5) Then
Cells(i+1, 2).EntireRow.Delete
End If
Next i
End Sub
and i want to add exceptional:
if the time is not so far (around 1 or 2 minutes), then dont delete the row.
for example,
from this:
GOPI | 09:29-12:00 |
TOPIK TERKINI | 10:26-10:27 |
TOPIK TERKINI | 11:45-11:47 |
BEPANNAH(R) | 12:02-14:00 |
to this:
GOPI | 09:29-12:00 |
BEPANNAH(R) | 12:02-14:00 |
i dont know what to do with this one.
thanks in advance!