Skip to content

Instantly share code, notes, and snippets.

@farindra
Created September 29, 2015 08:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save farindra/3fa66c7d5da0c9055420 to your computer and use it in GitHub Desktop.
Save farindra/3fa66c7d5da0c9055420 to your computer and use it in GitHub Desktop.
Excel PB1 Macro
Sub Gabung()
On Error Resume Next
Dim i As Long, iMatches As Long, j As Integer
Dim aTokens() As String: aTokens = Split("reply,response", ",")
Dim AA As String
For j = 1 To 31
If j < 10 Then AA = "0" & Trim(Str(j)) Else AA = Trim(Str(j))
For Each cell In Sheets(AA).Range("A5:A1000")
If Len(cell.Value) <= 2 Then
GoTo Lompat
End If
iMatches = (iMatches + 1)
Sheets(AA).Rows(cell.Row).Copy Sheets("ALL").Rows(iMatches)
Next
Lompat:
Next j
MsgBox "Sukses"
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment