Add value hasil pencarian ke tabel

  1. 6 tahun lalu

    Dear all,
    Mohon dibantu script Vba untuk add data hasil pencarian, ke dalam tabel yang ada di atas, hanya bisa (dibatasi)max berisi 7 row.File terlampir. Saya cb buat hasil menimpa terus..Demikian terimakasih sebelumnya

    Atau mas @Aribowo dapat juga menggunakan script berikut:

    Private Sub CommandButton1_Click()
        Dim lRow As Long
        Dim xlCell As Range
    
        lRow = WorksheetFunction.CountIf([E4:E10], "?*")
        If lRow < 7 Then
            With Me
                For Each xlCell In [E4:E10]
                    If xlCell = vbNullString Then
                        lRow = xlCell.Row
                        .Cells(lRow, 5).Value = [E18]
                        .Cells(lRow, 6).Value = [F18]
                        .Cells(lRow, 8).Value = [H18]
                        Exit For
                    End If
                Next
            End With
        End If
    End Sub

    Tujuan script pertama dan kedua tersebut sama, namun beda kasus. Demikian, semoga sesuai... ;)

  2. Caton

    8 Peb 2018 Terverifikasi Indonesia + 20.101 Poin

    Coba mas @Aribowo terapkan script berikut:

    Private Sub CommandButton1_Click()
        Dim lRow As Long
    
        lRow = WorksheetFunction.CountIf([E4:E10], "?*")
        If lRow < 7 Then
            With Me
                .Cells(lRow + 4, 5).Value = [E18]
                .Cells(lRow + 4, 6).Value = [F18]
                .Cells(lRow + 4, 8).Value = [H18]
            End With
        End If
    End Sub

    Demikian, semoga sesuai... ;)

  3. Caton

    8 Peb 2018 Terverifikasi Jawaban Terpilih Indonesia + 20.101 Poin

    Atau mas @Aribowo dapat juga menggunakan script berikut:

    Private Sub CommandButton1_Click()
        Dim lRow As Long
        Dim xlCell As Range
    
        lRow = WorksheetFunction.CountIf([E4:E10], "?*")
        If lRow < 7 Then
            With Me
                For Each xlCell In [E4:E10]
                    If xlCell = vbNullString Then
                        lRow = xlCell.Row
                        .Cells(lRow, 5).Value = [E18]
                        .Cells(lRow, 6).Value = [F18]
                        .Cells(lRow, 8).Value = [H18]
                        Exit For
                    End If
                Next
            End With
        End If
    End Sub

    Tujuan script pertama dan kedua tersebut sama, namun beda kasus. Demikian, semoga sesuai... ;)

  4. Ok master @Caton ..solved..Terimakasih y..????????.

  5. Caton

    8 Peb 2018 Terverifikasi Indonesia + 20.101 Poin

    Sama-sama mas @Aribowo ... :)

 

atau Mendaftar untuk ikut berdiskusi!