INPUT DATA BARIS YG TIDAK KOSONG SEKALIGUS

  1. 4 minggu lalu

    Salam para master, semog sehat selalu serta rizqi melimpah.
    Mohon pencerahannya pindah semua data yg ada isiannya saja dicolum bayar dari Sheet2 ke Sheet1 tidak sukses

    Sub Input_clik()
    Dim i As Integer
    Dim a As Integer
    h = Sheet1.Cells(2, "A").CurrentRegion.Rows.Count
    'cells(2,1) angka 2 menunjukkan baris, angka 1 menunjukan colum
    For i = 3 To h

    j = Sheet2.Cells(3, "A").CurrentRegion.Rows.Count
    'cells(2,1) angka 2 menunjukkan baris, angka 1 menunjukan colum
    For k = 3 To j
    a = Sheet2.Cells(k, 4)
    b = Sheet2.Cells(k, 3)
    t = "TODAY()"

    If a > 1 Then
    cek = Sheet2.Cells(k, 4)
    If cek < 5 Then
    Sheet1.Cells(i, 2).Value = "1"
    Sheet1.Cells(i, 2).Value = t.NumberFormat = "dd/mmm/yy"
    Sheet1.Cells(i, 3).Value = b
    Sheet1.Cells(i, 4).Value = ""
    Sheet1.Cells(i, 5).Value = a
    Sheet1.Cells(i, 3).Value = "BAYAR"
    End If
    Else
    Sheet1.Cells(i, 2).Value = "2"
    Sheet1.Cells(i, 2).Value = t.NumberFormat = "dd/mmm/yy"
    Sheet1.Cells(i, 3).Value = b
    Sheet1.Cells(i, 4).Value = a
    Sheet1.Cells(i, 5).Value = ""
    Sheet1.Cells(i, 3).Value = "BAYAR"

    End If
    Next i
    End Sub

  2. @mumuskh Salam para master, semog sehat selalu serta rizqi melimpah.
    Mohon pencerahannya pindah semua data yg ada isiannya saja dicolum bayar dari Sheet2 ke Sheet1 tidak sukses

    Sub Input_clik()
    Dim i As Integer
    Dim a As Integer
    h = Sheet1.Cells(2, "A").CurrentRegion.Rows.Count
    'cells(2,1) angka 2 menunjukkan baris, angka 1 menunjukan colum
    For i = 3 To h

    j = Sheet2.Cells(3, "A").CurrentRegion.Rows.Count
    'cells(2,1) angka 2 menunjukkan baris, angka 1 menunjukan colum
    For k = 3 To j
    a = Sheet2.Cells(k, 4)
    b = Sheet2.Cells(k, 3)
    t = "TODAY()"

    If a > 1 Then
    cek = Sheet2.Cells(k, 4)
    If cek < 5 Then
    Sheet1.Cells(i, 2).Value = "1"
    Sheet1.Cells(i, 2).Value = t.NumberFormat = "dd/mmm/yy"
    Sheet1.Cells(i, 3).Value = b
    Sheet1.Cells(i, 4).Value = ""
    Sheet1.Cells(i, 5).Value = a
    Sheet1.Cells(i, 3).Value = "BAYAR"
    End If
    Else
    Sheet1.Cells(i, 2).Value = "2"
    Sheet1.Cells(i, 2).Value = t.NumberFormat = "dd/mmm/yy"
    Sheet1.Cells(i, 3).Value = b
    Sheet1.Cells(i, 4).Value = a
    Sheet1.Cells(i, 5).Value = ""
    Sheet1.Cells(i, 3).Value = "BAYAR"

    End If
    Next i
    End Sub

    berikut filenya

 

atau Mendaftar untuk ikut berdiskusi!