使用VBA在Excel中过滤

我有一个从幻想运动侧生成的txt文件:这是它的外观:

team: Sharks status: playing date: 2016/03/11 team: Sharks status: playing date: 2016/03/11 team: Sharks status: not playing date: 2016/03/12 

所以每个团队,地位和date都要记住,我发布的不仅仅是鲨鱼游戏

超过一个团队可以在同一天播放

无论如何,我想整理一下,让队伍出现一次,以及他们的状态和date,或不是这样的事情

 team Sharks status:playing date playing: 2016/03/11 2016/03/11 date not playing: 2016/03/12And yes I tried do something with removing the duplicates but that does notv really work / not the result as expected Dim nextPlace As Long Dim maxRows As Long Sub walkThePlank() maxRows = 10000 'UPDATE THIS AS NEEDED nextPlace = 3 Worksheets("Sheet1").Range("B1").Value = "team:" Worksheets("Sheet1").Range("B2").Value = "status:" findData ("status: playing") addToNextSpace ("Status: Not playing") findData ("status: not playing") End Sub Sub findData(s As String) Dim i As Long Dim isPlaying As Boolean isPlaying = False For i = 1 To 1000 If isPlaying Then addToNextSpace (Worksheets("Sheet1").Range("A" & i).Value) End If If LCase(Range("A" & i).Value) = s Then isPlaying = True Else isPlaying = False End If Next i End Sub Sub addToNextSpace(s As String) Worksheets("Sheet1").Range("B" & nextPlace).Value = s nextPlace = nextPlace + 1 End Sub