Dear Hendro, Coba buat commandButton baru dan masukan script ini: Dim a, b As Integer a = 5 b = 1 Sheet1.Activate Do While b <= aSheet1.Cells(19 + b, 2).Value = Sheet7.Cells(b, 1).Value Sheet1.Cells(19 + b, 8).Value = Sheet7.Cells(5 + b, 1).Value Sheet1.Cells(19 + b, 4).Value = Sheet7.Cells(b, 2).Value Sheet1.Cells(19 + b, 10).Value = Sheet7.Cells(5 + b, 2).Value Sheet1.Cells(19 + b, 5).Value = Sheet7.Cells(b, 3).Value Sheet1.Cells(19 + b, 12).Value = Sheet7.Cells(5 + b, 3).Valueb = b + 1 Loop Semoga membantu. TerimaKasih.
Pada Kamis, 1 Desember 2016 16:26, "'Hendro@daya-motor' hendro_ari...@yahoo.com [belajar-excel]" <belajar-excel@yahoogroups.com> menulis: maaf bp.toby bisa kasih saya contoh nya..soalnya saya sdh mencoba pakai loop saya belum berhasil..dan sampai sekarang masih blm tau juga harus pakai loop yg apa?maaf baru belajar. ----- Original Message ----- From: "Toby kenzo tobyke...@yahoo.co.id [belajar-excel]" <belajar-excel@yahoogroups.com> To: <belajar-excel@yahoogroups.com> Sent: Thursday, December 01, 2016 3:10 PM Subject: Bls: [belajar-excel] pindah data Dear Hendro, Anda bisa menggunakan "Loop" method TerimaKasih. Pada Selasa, 29 November 2016 17:45, "Hendro Arifin hendro_ari...@yahoo.com [belajar-excel]" <belajar-excel@yahoogroups.com> menulis: selamat sore mr.kid dan rekan2..mohon bantuan untuk solusi berikut.saya bermaksud memindahkan data dari sheet list_ho ke sheet dt_ print dimana list_ho adalahhasil dari advance filter yang jumlah baris nya akan selalu berubah tiap kali tonbol print di tekan tetapi jumlah tidak lebih dari 10 baris dan dengan jumlah kolom tetap yaitu 3 kolom.saya mempunyai kode macro tetapisaya merasa kode saya tersebut terlalu panjang.bisakah kode saya tersebut di persingkat?atokah ada kode lain untuk menggantikan kode macro saya tersebut?mohon petunjukanyaterima kasih. salam hendro #yiv4553733650 #yiv4553733650 -- #yiv4553733650ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv4553733650 #yiv4553733650ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv4553733650 #yiv4553733650ygrp-mkp #yiv4553733650hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv4553733650 #yiv4553733650ygrp-mkp #yiv4553733650ads {margin-bottom:10px;}#yiv4553733650 #yiv4553733650ygrp-mkp .yiv4553733650ad {padding:0 0;}#yiv4553733650 #yiv4553733650ygrp-mkp .yiv4553733650ad p {margin:0;}#yiv4553733650 #yiv4553733650ygrp-mkp .yiv4553733650ad a {color:#0000ff;text-decoration:none;}#yiv4553733650 #yiv4553733650ygrp-sponsor #yiv4553733650ygrp-lc {font-family:Arial;}#yiv4553733650 #yiv4553733650ygrp-sponsor #yiv4553733650ygrp-lc #yiv4553733650hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv4553733650 #yiv4553733650ygrp-sponsor #yiv4553733650ygrp-lc .yiv4553733650ad {margin-bottom:10px;padding:0 0;}#yiv4553733650 #yiv4553733650actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv4553733650 #yiv4553733650activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv4553733650 #yiv4553733650activity span {font-weight:700;}#yiv4553733650 #yiv4553733650activity span:first-child {text-transform:uppercase;}#yiv4553733650 #yiv4553733650activity span a {color:#5085b6;text-decoration:none;}#yiv4553733650 #yiv4553733650activity span span {color:#ff7900;}#yiv4553733650 #yiv4553733650activity span .yiv4553733650underline {text-decoration:underline;}#yiv4553733650 .yiv4553733650attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv4553733650 .yiv4553733650attach div a {text-decoration:none;}#yiv4553733650 .yiv4553733650attach img {border:none;padding-right:5px;}#yiv4553733650 .yiv4553733650attach label {display:block;margin-bottom:5px;}#yiv4553733650 .yiv4553733650attach label a {text-decoration:none;}#yiv4553733650 blockquote {margin:0 0 0 4px;}#yiv4553733650 .yiv4553733650bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv4553733650 .yiv4553733650bold a {text-decoration:none;}#yiv4553733650 dd.yiv4553733650last p a {font-family:Verdana;font-weight:700;}#yiv4553733650 dd.yiv4553733650last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv4553733650 dd.yiv4553733650last p span.yiv4553733650yshortcuts {margin-right:0;}#yiv4553733650 div.yiv4553733650attach-table div div a {text-decoration:none;}#yiv4553733650 div.yiv4553733650attach-table {width:400px;}#yiv4553733650 div.yiv4553733650file-title a, #yiv4553733650 div.yiv4553733650file-title a:active, #yiv4553733650 div.yiv4553733650file-title a:hover, #yiv4553733650 div.yiv4553733650file-title a:visited {text-decoration:none;}#yiv4553733650 div.yiv4553733650photo-title a, #yiv4553733650 div.yiv4553733650photo-title a:active, #yiv4553733650 div.yiv4553733650photo-title a:hover, #yiv4553733650 div.yiv4553733650photo-title a:visited {text-decoration:none;}#yiv4553733650 div#yiv4553733650ygrp-mlmsg #yiv4553733650ygrp-msg p a span.yiv4553733650yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv4553733650 .yiv4553733650green {color:#628c2a;}#yiv4553733650 .yiv4553733650MsoNormal {margin:0 0 0 0;}#yiv4553733650 o {font-size:0;}#yiv4553733650 #yiv4553733650photos div {float:left;width:72px;}#yiv4553733650 #yiv4553733650photos div div {border:1px solid #666666;height:62px;overflow:hidden;width:62px;}#yiv4553733650 #yiv4553733650photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv4553733650 #yiv4553733650reco-category {font-size:77%;}#yiv4553733650 #yiv4553733650reco-desc {font-size:77%;}#yiv4553733650 .yiv4553733650replbq {margin:4px;}#yiv4553733650 #yiv4553733650ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv4553733650 #yiv4553733650ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv4553733650 #yiv4553733650ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv4553733650 #yiv4553733650ygrp-mlmsg select, #yiv4553733650 input, #yiv4553733650 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv4553733650 #yiv4553733650ygrp-mlmsg pre, #yiv4553733650 code {font:115% monospace;}#yiv4553733650 #yiv4553733650ygrp-mlmsg * {line-height:1.22em;}#yiv4553733650 #yiv4553733650ygrp-mlmsg #yiv4553733650logo {padding-bottom:10px;}#yiv4553733650 #yiv4553733650ygrp-msg p a {font-family:Verdana;}#yiv4553733650 #yiv4553733650ygrp-msg p#yiv4553733650attach-count span {color:#1E66AE;font-weight:700;}#yiv4553733650 #yiv4553733650ygrp-reco #yiv4553733650reco-head {color:#ff7900;font-weight:700;}#yiv4553733650 #yiv4553733650ygrp-reco {margin-bottom:20px;padding:0px;}#yiv4553733650 #yiv4553733650ygrp-sponsor #yiv4553733650ov li a {font-size:130%;text-decoration:none;}#yiv4553733650 #yiv4553733650ygrp-sponsor #yiv4553733650ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv4553733650 #yiv4553733650ygrp-sponsor #yiv4553733650ov ul {margin:0;padding:0 0 0 8px;}#yiv4553733650 #yiv4553733650ygrp-text {font-family:Georgia;}#yiv4553733650 #yiv4553733650ygrp-text p {margin:0 0 1em 0;}#yiv4553733650 #yiv4553733650ygrp-text tt {font-size:120%;}#yiv4553733650 #yiv4553733650ygrp-vital ul li:last-child {border-right:none !important;}#yiv4553733650 #yiv4177498898 #yiv4177498898 -- #yiv4177498898ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv4177498898 #yiv4177498898ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv4177498898 #yiv4177498898ygrp-mkp #yiv4177498898hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv4177498898 #yiv4177498898ygrp-mkp #yiv4177498898ads {margin-bottom:10px;}#yiv4177498898 #yiv4177498898ygrp-mkp .yiv4177498898ad {padding:0 0;}#yiv4177498898 #yiv4177498898ygrp-mkp .yiv4177498898ad p {margin:0;}#yiv4177498898 #yiv4177498898ygrp-mkp .yiv4177498898ad a {color:#0000ff;text-decoration:none;}#yiv4177498898 #yiv4177498898ygrp-sponsor #yiv4177498898ygrp-lc {font-family:Arial;}#yiv4177498898 #yiv4177498898ygrp-sponsor #yiv4177498898ygrp-lc #yiv4177498898hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv4177498898 #yiv4177498898ygrp-sponsor #yiv4177498898ygrp-lc .yiv4177498898ad {margin-bottom:10px;padding:0 0;}#yiv4177498898 #yiv4177498898actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv4177498898 #yiv4177498898activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv4177498898 #yiv4177498898activity span {font-weight:700;}#yiv4177498898 #yiv4177498898activity span:first-child {text-transform:uppercase;}#yiv4177498898 #yiv4177498898activity span a {color:#5085b6;text-decoration:none;}#yiv4177498898 #yiv4177498898activity span span {color:#ff7900;}#yiv4177498898 #yiv4177498898activity span .yiv4177498898underline {text-decoration:underline;}#yiv4177498898 .yiv4177498898attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv4177498898 .yiv4177498898attach div a {text-decoration:none;}#yiv4177498898 .yiv4177498898attach img {border:none;padding-right:5px;}#yiv4177498898 .yiv4177498898attach label {display:block;margin-bottom:5px;}#yiv4177498898 .yiv4177498898attach label a {text-decoration:none;}#yiv4177498898 blockquote {margin:0 0 0 4px;}#yiv4177498898 .yiv4177498898bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv4177498898 .yiv4177498898bold a {text-decoration:none;}#yiv4177498898 dd.yiv4177498898last p a {font-family:Verdana;font-weight:700;}#yiv4177498898 dd.yiv4177498898last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv4177498898 dd.yiv4177498898last p span.yiv4177498898yshortcuts {margin-right:0;}#yiv4177498898 div.yiv4177498898attach-table div div a {text-decoration:none;}#yiv4177498898 div.yiv4177498898attach-table {width:400px;}#yiv4177498898 div.yiv4177498898file-title a, #yiv4177498898 div.yiv4177498898file-title a:active, #yiv4177498898 div.yiv4177498898file-title a:hover, #yiv4177498898 div.yiv4177498898file-title a:visited {text-decoration:none;}#yiv4177498898 div.yiv4177498898photo-title a, #yiv4177498898 div.yiv4177498898photo-title a:active, #yiv4177498898 div.yiv4177498898photo-title a:hover, #yiv4177498898 div.yiv4177498898photo-title a:visited {text-decoration:none;}#yiv4177498898 div#yiv4177498898ygrp-mlmsg #yiv4177498898ygrp-msg p a span.yiv4177498898yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv4177498898 .yiv4177498898green {color:#628c2a;}#yiv4177498898 .yiv4177498898MsoNormal {margin:0 0 0 0;}#yiv4177498898 o {font-size:0;}#yiv4177498898 #yiv4177498898photos div {float:left;width:72px;}#yiv4177498898 #yiv4177498898photos div div {border:1px solid #666666;height:62px;overflow:hidden;width:62px;}#yiv4177498898 #yiv4177498898photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv4177498898 #yiv4177498898reco-category {font-size:77%;}#yiv4177498898 #yiv4177498898reco-desc {font-size:77%;}#yiv4177498898 .yiv4177498898replbq {margin:4px;}#yiv4177498898 #yiv4177498898ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv4177498898 #yiv4177498898ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv4177498898 #yiv4177498898ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv4177498898 #yiv4177498898ygrp-mlmsg select, #yiv4177498898 input, #yiv4177498898 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv4177498898 #yiv4177498898ygrp-mlmsg pre, #yiv4177498898 code {font:115% monospace;}#yiv4177498898 #yiv4177498898ygrp-mlmsg * {line-height:1.22em;}#yiv4177498898 #yiv4177498898ygrp-mlmsg #yiv4177498898logo {padding-bottom:10px;}#yiv4177498898 #yiv4177498898ygrp-msg p a {font-family:Verdana;}#yiv4177498898 #yiv4177498898ygrp-msg p#yiv4177498898attach-count span {color:#1E66AE;font-weight:700;}#yiv4177498898 #yiv4177498898ygrp-reco #yiv4177498898reco-head {color:#ff7900;font-weight:700;}#yiv4177498898 #yiv4177498898ygrp-reco {margin-bottom:20px;padding:0px;}#yiv4177498898 #yiv4177498898ygrp-sponsor #yiv4177498898ov li a {font-size:130%;text-decoration:none;}#yiv4177498898 #yiv4177498898ygrp-sponsor #yiv4177498898ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv4177498898 #yiv4177498898ygrp-sponsor #yiv4177498898ov ul {margin:0;padding:0 0 0 8px;}#yiv4177498898 #yiv4177498898ygrp-text {font-family:Georgia;}#yiv4177498898 #yiv4177498898ygrp-text p {margin:0 0 1em 0;}#yiv4177498898 #yiv4177498898ygrp-text tt {font-size:120%;}#yiv4177498898 #yiv4177498898ygrp-vital ul li:last-child {border-right:none !important;}#yiv4177498898