Mohon maaf ada ketidak cocokan antara tulisan di email dan di file, yang
benar penulisan VBAnya:
Sub Etung()
Dim kl As String
Dim i As Integer
Dim baris As Integer
Dim a As Integer
Dim it As Integer
Dim z As Integer
Dim itu As Integer
baris = Sheet1.Range("A10000").End(xlUp).row
z = 7
Sheet1.Range("Q9:Q1000").ClearContents
For i = 9 To baris
it = 0
 For a = 1 To 11
 If Sheet1.Cells(i, a + 3) < *Sheet6*.Cells(39 + a, 5 +
kelase(Sheet1.Cells(i, 1))) Then
 it = it + 1
 Else
 End If
 Next a
 If (it > 3 And Len(Sheet1.Cells(i, 3)) > 2) Then
  itu = itu + 1
 Sheets("kopi").Cells(i, 17) = z & Format(itu, "00")
 Else
 If (Sheet1.Cells(i, 15) < *Sheet6*.Cells(51, 5 + kelase(Sheet1.Cells(i,
1))) And Len(Sheet1.Cells(i, 3)) > 2) Then
  itu = itu + 1
 Sheets("kopi").Cells(i, 17) = z & Format(itu, "00")
 Else
 End If
 End If
 Next i
End Sub

manakah kesalahannya?
dapat dijalankan dari sheet 1 namun tidak dapat dijalankan dari sheet6.

On Wed, Jun 15, 2016 at 8:48 AM, Nang Agus nanga...@gmail.com
[belajar-excel] <belajar-excel@yahoogroups.com> wrote:

>
>
> Asalamualaikum wrahmatullah,
>
> Kepada Member B-Excel.
>
> Saya membuat sebuah perintah VBA. Perintah tersebut dapat dijalankan dari
> sheet1 namun tidak dapat dijalankan dari sheet6, Manakah penulisan yang
> salah?
>
> Sub Etung() Dim kl As String Dim i As Integer Dim baris As Integer Dim a As
> Integer Dim it As Integer Dim z As Integer Dim itu As Integer baris =
> Sheet1.Range("A10000").End(xlUp).row z = 7
> Sheet1.Range("Q9:Q1000").ClearContents For i = 9 To baris it = 0  For a =
> 1 To 11  If Sheet1.Cells(i, a + 3) < Sheet3.Cells(29 + a, 5 +
> kelase(Sheet1.Cells(i, 1))) Then  it = it + 1  Else  End If  Next a  If
> (it > 3 And Len(Sheet1.Cells(i, 3)) > 2) Then   itu = itu + 1  
> Sheets("kopi").Cells(i,
> 17) = z & Format(itu, "00")  Else  If (Sheet1.Cells(i, 15) <
> Sheet3.Cells(41, 5 + kelase(Sheet1.Cells(i, 1))) And Len(Sheet1.Cells(i,
> 3)) > 2) Then   itu = itu + 1  Sheets("kopi").Cells(i, 17) = z &
> Format(itu, "00")  Else  End If  End If  Next i End Sub
> atas perhatiannya diucapkan terima kasih.
> Wasalamualaikum warahmatullah.
>
> NangAgus
>
> 
>

Attachment: leger RaporB Excel.xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12

  • [belajar-excel... Nang Agus nanga...@gmail.com [belajar-excel]
    • Re: [bela... Nang Agus nanga...@gmail.com [belajar-excel]
      • Bls: ... Toby kenzo tobyke...@yahoo.co.id [belajar-excel]
    • Re: [bela... 'Mr. Kid' mr.nm...@gmail.com [belajar-excel]
    • [belajar-... Nang Agus nanga...@gmail.com [belajar-excel]
      • Re: [... 'Zainul Ulum (Yahoo)' zainul_u...@yahoo.com [belajar-excel]

Reply via email to