Silahkan mas
Sub CopytoNewFile()
Dim i As Long
Dim n As Long
Dim rLast As Long
Dim sht As Worksheet
Dim shtTergabung As Worksheet
Const sNewName As String = "File Baru"
Const rMulai As Long = 2
Set shtTergabung = Sheets("Jadi File Terpisah")
Application.DisplayAlerts = False
Application.ScreenUpdating = False
i = 2
For Each sht In Sheets
With sht
If sht.Name <> shtTergabung.Name Then
rLast = .Cells(.Rows.Count, 2).End(xlUp).Row
For n = rLast To rMulai Step -1
.Rows(n).EntireRow.Copy Destination:=shtTergabung.Rows(i)
i = i + 1
Next n
.Delete
End If
End With
Next sht
ActiveWorkbook.SaveAs ThisWorkbook.Path & "\" & sNewName
Set shtTergabung = Nothing
Application.DisplayAlerts = False
Application.ScreenUpdating = False
End Sub
2009/7/29, agt <[email protected]>:
> Dear Pakar
>
>
>
> Mohon bantuannya utk problem seperti attach:
>
> Saya mau copy data dari sheet 1, 2 dan 3 ke file baru seperti di sheet 4.
> Kalau dgn cara = klik kolom sih bisa, tapi karna datanya banyak dan selalu
> update, adakah cara yg simple dan manjur?
>
>
>
> Saya sudah utak-atik di data base belum ketemu nih.
>
>
>
> Best Regards,
>
> Antoni Ginting
>
> Jr. Inspection Spt.
>
> 2.JPGcid:[email protected]
> Plant/Head Office:
>
> Mailing Address :
>
> Wisma KPI
>
> Jl. Pupuk Raya Km.2
>
> Bontang -75314
>
> Kalimantan Timur
>
> Phone : +62-548-41091 ext.6211
> Fax : +62-548-41417
> HP : +628125521121
> email: <mailto:[email protected]> [email protected]
>
>
>
>
>
> ______________________________________________________________________________________________________________
>
> Disclaimer :
> ______________________________________________________________________________________________________________
>
> This message is intended for the lawful recipient(s) explicitly stated in
> above only.
> It may contain confidential information prohibited for any Unauthorized use
> by any party
> other than the lawful addressee. The message, information and statement
> expressed herein
> should also be legally privileged for the lawful recipient(s).
>
> If you are not the intended recipient(s) or person responsible for
> delivering it to the intended recipient(s),
> you must therefore be notified not to copy, print, distribute or take any
> action in
> reliance on it, directly or indirectly.
> ______________________________________________________________________________________________________________
> Please consider ENVIRONTMENT before PRINTING this email .
>