What do you mean nothing?
All the attachments you are uploading are exactly the same, and you are not proving anything that way. My question is, why is 2nd and 3rd January missing in your final output?
If that was a mistake from your part, then try this code
Code:Sub ExcelFox() Dim lng As Long: lng = 4 While Not (IsEmpty(Range("D" & lng).Value) Or IsEmpty(Range("E" & lng).Value)) If Range("D" & lng).Value > Range("E" & lng).Value Then Range("D" & lng).Insert xlDown ElseIf Range("D" & lng).Value < Range("E" & lng).Value Then Range("E" & lng).Insert xlDown End If lng = lng + 1 Wend End Sub




Reply With Quote
Bookmarks