ups ternyata saya yg salah pak suyono... terima kasih bantuannya... cocok
sesuai yg saya harapkan...
rumus yg ini lupa saya copy...pantes aja hasilnya error... hahaha.. makasih
pak.. top rumusnya..
Public Function idxItem(item As String) As Integer On Error GoTo Err
idxItem = Application.WorksheetFunction.Match(item,Sheets("REKAP
FULL").Columns("C:C"), 0) Exit Function Err: idxItem = 0 End Function
Pada Selasa, 6 Oktober 2015 18:45, Ivan Sebastian <[email protected]>
menulis:
sudah saya coba hasilnya... sub or function not defined... kayaknya ada yg
salah nih..
Pada Selasa, 6 Oktober 2015 18:28, "SUYONO [email protected]
[belajar-excel]" <[email protected]> menulis:
Coba diganti seperti ini pak, semoga sesuai keinginan. Sub
Rectangle7_Click() Dim lastRow As Long, i As Long, j As Long Dim idxrow As
Integer Dim jml As Integer Dim item As String Dim getVal As Integer
Range("I2:P473").ClearContents lastRow = 597 For i = 1 To lastRow item =
Sheets("CETAK NOTA").Cells(i, 2).Value If idxItem(item) > 1 Then
getVal = Sheets("CETAK NOTA").Cells(i,3).Value idxrow = idxItem(item)
jml = Application.WorksheetFunction.CountA(Range(Cells(idxrow,9),
Cells(idxrow, 16))) jml = jml + 9 Sheets("REKAP
FULL").Cells(idxrow, jml).Value= getVal End If Next i End Sub
‘====================================== ‘fungsi untuk mencari indek item.
‘====================================== Public Function idxItem(item As
String) As Integer On Error GoTo Err idxItem =
Application.WorksheetFunction.Match(item,Sheets("REKAP FULL").Columns("C:C"),
0) Exit Function Err: idxItem = 0 End Function
From:[email protected] [mailto:[email protected]]
Sent: Tuesday, October 06, 2015 1:35 PM
To: [email protected]
Subject: Bls: [belajar-excel] tolong dibantu perbaiki rumus makrovbanya... [1
Attachment] terima kasih atas bantuannya pak suyono... kalo saya coba
bikin ke bentuk dengan model lain lg... bisa bantuperbaiki rumusnya... kurang
lebih hampir sama.. cuman jumlah item lebihbanyak... thx.. data saya
lampirkan... Pada Selasa, 6 Oktober 2015 7:34,"SUYONO
[email protected] [belajar-excel]"<[email protected]> menulis:
Pagi Pak Ivan Coba ditambahin fungsi counta danditambah 8 sebagai colom
pertama pengisian data. Sub Rectangle6_Click() Range("h2:ae8").ClearContents
Application.ScreenUpdating = False Dim lastRow As Long, i As Long, j AsLong Dim
jml As Integer lastRow = 597 j = 1 For x = 2 To 7 For i = 1 To lastRow
If InStr(Sheets(2).Range("B" & i).Value, Cells(x, 2).Value) Then
jml = Application.WorksheetFunction.CountA(Sheets(3).Range(Cells(x, 8),Cells(x,
31))) jml = jml + 8 Sheets(2).Cells(i, 3).Copy
Destination:=Sheets(3).Cells(x, jml) j = j + 1 End If
Next i Next x Application.ScreenUpdating = True End Sub Salam Yono From:
[email protected][mailto:[email protected]]
Sent: Monday, October 05, 2015 11:03 PM
To: [email protected]
Subject: [belajar-excel] tolong dibantu perbaiki rumus makro vbanya...[1
Attachment] hello master2 excel.. ini saya lg coba2 rumus vba cuman vba
untuktombol updatenya saya rasa lom sempurna... sekiranya tolong dibantu
diperbaikisupaya jadi sempurna...file saya lampirkan... thx
#yiv9622847210 -- #yiv9622847210ygrp-mkp {border:1px solid
#d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv9622847210
#yiv9622847210ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv9622847210
#yiv9622847210ygrp-mkp #yiv9622847210hd
{color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
0;}#yiv9622847210 #yiv9622847210ygrp-mkp #yiv9622847210ads
{margin-bottom:10px;}#yiv9622847210 #yiv9622847210ygrp-mkp .yiv9622847210ad
{padding:0 0;}#yiv9622847210 #yiv9622847210ygrp-mkp .yiv9622847210ad p
{margin:0;}#yiv9622847210 #yiv9622847210ygrp-mkp .yiv9622847210ad a
{color:#0000ff;text-decoration:none;}#yiv9622847210 #yiv9622847210ygrp-sponsor
#yiv9622847210ygrp-lc {font-family:Arial;}#yiv9622847210
#yiv9622847210ygrp-sponsor #yiv9622847210ygrp-lc #yiv9622847210hd {margin:10px
0px;font-weight:700;font-size:78%;line-height:122%;}#yiv9622847210
#yiv9622847210ygrp-sponsor #yiv9622847210ygrp-lc .yiv9622847210ad
{margin-bottom:10px;padding:0 0;}#yiv9622847210 #yiv9622847210actions
{font-family:Verdana;font-size:11px;padding:10px 0;}#yiv9622847210
#yiv9622847210activity
{background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv9622847210
#yiv9622847210activity span {font-weight:700;}#yiv9622847210
#yiv9622847210activity span:first-child
{text-transform:uppercase;}#yiv9622847210 #yiv9622847210activity span a
{color:#5085b6;text-decoration:none;}#yiv9622847210 #yiv9622847210activity span
span {color:#ff7900;}#yiv9622847210 #yiv9622847210activity span
.yiv9622847210underline {text-decoration:underline;}#yiv9622847210
.yiv9622847210attach
{clear:both;display:table;font-family:Arial;font-size:12px;padding:10px
0;width:400px;}#yiv9622847210 .yiv9622847210attach div a
{text-decoration:none;}#yiv9622847210 .yiv9622847210attach img
{border:none;padding-right:5px;}#yiv9622847210 .yiv9622847210attach label
{display:block;margin-bottom:5px;}#yiv9622847210 .yiv9622847210attach label a
{text-decoration:none;}#yiv9622847210 blockquote {margin:0 0 0
4px;}#yiv9622847210 .yiv9622847210bold
{font-family:Arial;font-size:13px;font-weight:700;}#yiv9622847210
.yiv9622847210bold a {text-decoration:none;}#yiv9622847210 dd.yiv9622847210last
p a {font-family:Verdana;font-weight:700;}#yiv9622847210 dd.yiv9622847210last p
span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv9622847210
dd.yiv9622847210last p span.yiv9622847210yshortcuts
{margin-right:0;}#yiv9622847210 div.yiv9622847210attach-table div div a
{text-decoration:none;}#yiv9622847210 div.yiv9622847210attach-table
{width:400px;}#yiv9622847210 div.yiv9622847210file-title a, #yiv9622847210
div.yiv9622847210file-title a:active, #yiv9622847210
div.yiv9622847210file-title a:hover, #yiv9622847210 div.yiv9622847210file-title
a:visited {text-decoration:none;}#yiv9622847210 div.yiv9622847210photo-title a,
#yiv9622847210 div.yiv9622847210photo-title a:active, #yiv9622847210
div.yiv9622847210photo-title a:hover, #yiv9622847210
div.yiv9622847210photo-title a:visited {text-decoration:none;}#yiv9622847210
div#yiv9622847210ygrp-mlmsg #yiv9622847210ygrp-msg p a
span.yiv9622847210yshortcuts
{font-family:Verdana;font-size:10px;font-weight:normal;}#yiv9622847210
.yiv9622847210green {color:#628c2a;}#yiv9622847210 .yiv9622847210MsoNormal
{margin:0 0 0 0;}#yiv9622847210 o {font-size:0;}#yiv9622847210
#yiv9622847210photos div {float:left;width:72px;}#yiv9622847210
#yiv9622847210photos div div {border:1px solid
#666666;height:62px;overflow:hidden;width:62px;}#yiv9622847210
#yiv9622847210photos div label
{color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv9622847210
#yiv9622847210reco-category {font-size:77%;}#yiv9622847210
#yiv9622847210reco-desc {font-size:77%;}#yiv9622847210 .yiv9622847210replbq
{margin:4px;}#yiv9622847210 #yiv9622847210ygrp-actbar div a:first-child
{margin-right:2px;padding-right:5px;}#yiv9622847210 #yiv9622847210ygrp-mlmsg
{font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv9622847210
#yiv9622847210ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv9622847210
#yiv9622847210ygrp-mlmsg select, #yiv9622847210 input, #yiv9622847210 textarea
{font:99% Arial, Helvetica, clean, sans-serif;}#yiv9622847210
#yiv9622847210ygrp-mlmsg pre, #yiv9622847210 code {font:115%
monospace;}#yiv9622847210 #yiv9622847210ygrp-mlmsg *
{line-height:1.22em;}#yiv9622847210 #yiv9622847210ygrp-mlmsg #yiv9622847210logo
{padding-bottom:10px;}#yiv9622847210 #yiv9622847210ygrp-msg p a
{font-family:Verdana;}#yiv9622847210 #yiv9622847210ygrp-msg
p#yiv9622847210attach-count span {color:#1E66AE;font-weight:700;}#yiv9622847210
#yiv9622847210ygrp-reco #yiv9622847210reco-head
{color:#ff7900;font-weight:700;}#yiv9622847210 #yiv9622847210ygrp-reco
{margin-bottom:20px;padding:0px;}#yiv9622847210 #yiv9622847210ygrp-sponsor
#yiv9622847210ov li a {font-size:130%;text-decoration:none;}#yiv9622847210
#yiv9622847210ygrp-sponsor #yiv9622847210ov li
{font-size:77%;list-style-type:square;padding:6px 0;}#yiv9622847210
#yiv9622847210ygrp-sponsor #yiv9622847210ov ul {margin:0;padding:0 0 0
8px;}#yiv9622847210 #yiv9622847210ygrp-text
{font-family:Georgia;}#yiv9622847210 #yiv9622847210ygrp-text p {margin:0 0 1em
0;}#yiv9622847210 #yiv9622847210ygrp-text tt {font-size:120%;}#yiv9622847210
#yiv9622847210ygrp-vital ul li:last-child {border-right:none
!important;}#yiv9622847210