Dear Pak Agus,
Terima kasih pak, saya sudah coba pakai record macro tapi gagal terus, sehingga
saya coba tanya ke milist.
sekali lagi terima kasih atas bantuannya semoga bapak cepat sukses dalam
pembellajaran yang sedang dilakukan.
Salam Abo,
Abo
Pada Kamis, 6 Agustus 2015 11:37, "Nang Agus [email protected]
[belajar-excel]" <[email protected]> menulis:
Dear Abo,
Bagaimana kalau cekrip menyimpan dibuat seperti ini?
Option Explicit
Sub Kopi()
Dim i As Integer
Dim mak As Integer
Dim baris As Integer
Application.ScreenUpdating = False
mak = Application.CountA(Worksheets("Sheet1").Range("E9:E21"))
baris = Worksheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1).Row
For i = 0 To mak - 1
Worksheets("Sheet1").Range("H4").Copy
Worksheets("Sheet2").Range("A" & baris + i).PasteSpecial xlValues
Worksheets("Sheet1").Range("H5").Copy
Worksheets("Sheet2").Range("B" & baris + i).PasteSpecial xlValues
Worksheets("Sheet1").Range("C4").Copy
Worksheets("Sheet2").Range("C" & baris + i).PasteSpecial xlValues
Worksheets("Sheet1").Range("C5").Copy
Worksheets("Sheet2").Range("D" & baris + i).PasteSpecial xlValues
Worksheets("Sheet1").Range("A" & 9 + i).Copy
Worksheets("Sheet2").Range("E" & baris + i).PasteSpecial xlValues
Worksheets("Sheet1").Range("C" & 9 + i).Copy
Worksheets("Sheet2").Range("F" & baris + i).PasteSpecial xlValues
Worksheets("Sheet1").Range("D" & 9 + i).Copy
Worksheets("Sheet2").Range("G" & baris + i).PasteSpecial xlValues
Worksheets("Sheet1").Range("F" & 9 + i).Copy
Worksheets("Sheet2").Range("H" & baris + i).PasteSpecial xlValues
Worksheets("Sheet1").Range("H" & 9 + i).Copy
Worksheets("Sheet2").Range("I" & baris + i).PasteSpecial xlValues
Next i
Application.ScreenUpdating = True
End Sub
sedangkan untuk menghapusnya boleh digunakan cekrip:
Sub hapus()
Sheets("Sheet1").Range("C4:C6").ClearContents
Sheets("Sheet1").Range("H4:C6").ClearContents
Sheets("Sheet1").Range("A9:G21").ClearContents
Sheets("Sheet1").Range("F23:H23").ClearContents
End Sub
sebenarnya untuk belajar macro dapat menggunakan record macro. saya sendiri
masih belajar dengan cara tersebut.
salam
Agus
2015-08-05 15:23 GMT+07:00 Cahaya Hati Abadi [email protected]
[belajar-excel] <[email protected]>:
Dear Para Master,Mohon bantuan untuk pertanyaan saya sesuai terlampir.
Terima kasih.
Salam hormat,Abo
#yiv9082263024 -- #yiv9082263024ygrp-mkp {border:1px solid
#d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv9082263024
#yiv9082263024ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv9082263024
#yiv9082263024ygrp-mkp #yiv9082263024hd
{color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
0;}#yiv9082263024 #yiv9082263024ygrp-mkp #yiv9082263024ads
{margin-bottom:10px;}#yiv9082263024 #yiv9082263024ygrp-mkp .yiv9082263024ad
{padding:0 0;}#yiv9082263024 #yiv9082263024ygrp-mkp .yiv9082263024ad p
{margin:0;}#yiv9082263024 #yiv9082263024ygrp-mkp .yiv9082263024ad a
{color:#0000ff;text-decoration:none;}#yiv9082263024 #yiv9082263024ygrp-sponsor
#yiv9082263024ygrp-lc {font-family:Arial;}#yiv9082263024
#yiv9082263024ygrp-sponsor #yiv9082263024ygrp-lc #yiv9082263024hd {margin:10px
0px;font-weight:700;font-size:78%;line-height:122%;}#yiv9082263024
#yiv9082263024ygrp-sponsor #yiv9082263024ygrp-lc .yiv9082263024ad
{margin-bottom:10px;padding:0 0;}#yiv9082263024 #yiv9082263024actions
{font-family:Verdana;font-size:11px;padding:10px 0;}#yiv9082263024
#yiv9082263024activity
{background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv9082263024
#yiv9082263024activity span {font-weight:700;}#yiv9082263024
#yiv9082263024activity span:first-child
{text-transform:uppercase;}#yiv9082263024 #yiv9082263024activity span a
{color:#5085b6;text-decoration:none;}#yiv9082263024 #yiv9082263024activity span
span {color:#ff7900;}#yiv9082263024 #yiv9082263024activity span
.yiv9082263024underline {text-decoration:underline;}#yiv9082263024
.yiv9082263024attach
{clear:both;display:table;font-family:Arial;font-size:12px;padding:10px
0;width:400px;}#yiv9082263024 .yiv9082263024attach div a
{text-decoration:none;}#yiv9082263024 .yiv9082263024attach img
{border:none;padding-right:5px;}#yiv9082263024 .yiv9082263024attach label
{display:block;margin-bottom:5px;}#yiv9082263024 .yiv9082263024attach label a
{text-decoration:none;}#yiv9082263024 blockquote {margin:0 0 0
4px;}#yiv9082263024 .yiv9082263024bold
{font-family:Arial;font-size:13px;font-weight:700;}#yiv9082263024
.yiv9082263024bold a {text-decoration:none;}#yiv9082263024 dd.yiv9082263024last
p a {font-family:Verdana;font-weight:700;}#yiv9082263024 dd.yiv9082263024last p
span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv9082263024
dd.yiv9082263024last p span.yiv9082263024yshortcuts
{margin-right:0;}#yiv9082263024 div.yiv9082263024attach-table div div a
{text-decoration:none;}#yiv9082263024 div.yiv9082263024attach-table
{width:400px;}#yiv9082263024 div.yiv9082263024file-title a, #yiv9082263024
div.yiv9082263024file-title a:active, #yiv9082263024
div.yiv9082263024file-title a:hover, #yiv9082263024 div.yiv9082263024file-title
a:visited {text-decoration:none;}#yiv9082263024 div.yiv9082263024photo-title a,
#yiv9082263024 div.yiv9082263024photo-title a:active, #yiv9082263024
div.yiv9082263024photo-title a:hover, #yiv9082263024
div.yiv9082263024photo-title a:visited {text-decoration:none;}#yiv9082263024
div#yiv9082263024ygrp-mlmsg #yiv9082263024ygrp-msg p a
span.yiv9082263024yshortcuts
{font-family:Verdana;font-size:10px;font-weight:normal;}#yiv9082263024
.yiv9082263024green {color:#628c2a;}#yiv9082263024 .yiv9082263024MsoNormal
{margin:0 0 0 0;}#yiv9082263024 o {font-size:0;}#yiv9082263024
#yiv9082263024photos div {float:left;width:72px;}#yiv9082263024
#yiv9082263024photos div div {border:1px solid
#666666;height:62px;overflow:hidden;width:62px;}#yiv9082263024
#yiv9082263024photos div label
{color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv9082263024
#yiv9082263024reco-category {font-size:77%;}#yiv9082263024
#yiv9082263024reco-desc {font-size:77%;}#yiv9082263024 .yiv9082263024replbq
{margin:4px;}#yiv9082263024 #yiv9082263024ygrp-actbar div a:first-child
{margin-right:2px;padding-right:5px;}#yiv9082263024 #yiv9082263024ygrp-mlmsg
{font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv9082263024
#yiv9082263024ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv9082263024
#yiv9082263024ygrp-mlmsg select, #yiv9082263024 input, #yiv9082263024 textarea
{font:99% Arial, Helvetica, clean, sans-serif;}#yiv9082263024
#yiv9082263024ygrp-mlmsg pre, #yiv9082263024 code {font:115%
monospace;}#yiv9082263024 #yiv9082263024ygrp-mlmsg *
{line-height:1.22em;}#yiv9082263024 #yiv9082263024ygrp-mlmsg #yiv9082263024logo
{padding-bottom:10px;}#yiv9082263024 #yiv9082263024ygrp-msg p a
{font-family:Verdana;}#yiv9082263024 #yiv9082263024ygrp-msg
p#yiv9082263024attach-count span {color:#1E66AE;font-weight:700;}#yiv9082263024
#yiv9082263024ygrp-reco #yiv9082263024reco-head
{color:#ff7900;font-weight:700;}#yiv9082263024 #yiv9082263024ygrp-reco
{margin-bottom:20px;padding:0px;}#yiv9082263024 #yiv9082263024ygrp-sponsor
#yiv9082263024ov li a {font-size:130%;text-decoration:none;}#yiv9082263024
#yiv9082263024ygrp-sponsor #yiv9082263024ov li
{font-size:77%;list-style-type:square;padding:6px 0;}#yiv9082263024
#yiv9082263024ygrp-sponsor #yiv9082263024ov ul {margin:0;padding:0 0 0
8px;}#yiv9082263024 #yiv9082263024ygrp-text
{font-family:Georgia;}#yiv9082263024 #yiv9082263024ygrp-text p {margin:0 0 1em
0;}#yiv9082263024 #yiv9082263024ygrp-text tt {font-size:120%;}#yiv9082263024
#yiv9082263024ygrp-vital ul li:last-child {border-right:none
!important;}#yiv9082263024