aku = Sheet1.Cells(Rows.Count, 4).End(xlUp).Offset(1, 0).Row Range("D" & aku).Select
Senin, 08 November 2021
Baris awal di bawah judul (Baris kosong pertama di database)
Ukuran Lebar dan Tinggi Cell
Sub tess() ActiveCell.EntireColumn.ColumnWidth = 12 ActiveCell.EntireRow.RowHeight = 35 End Sub
Hide-Unhide Sheet
Sub tess() Sheet1.Visible = 1 ' angka 2 hide ' angka 1 unhide ' true 'false End Sub
Senin, 01 November 2021
Pencarian : Filter NISN dan Siswa copy -Setoran
Private Sub CMDCARI_Click() On Error GoTo Salah Dim iRow As Long Dim JData As Long Dim CARI_DATA As Object Set CARI_DATA = Sheet2 Sheet6.Range("K4").Value = Me.CBKRITERIA.Value Sheet6.Range("K5").Value = "*" & Me.TXTCARI.Value & "*" CARI_DATA.Range("A4").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= _ Sheet6.Range("K4:K5"), CopyToRange:=Sheet6.Range("A4:I4"), Unique:=False iRow = Sheet6.Range("A" & Rows.Count).End(xlUp).Row If Application.WorksheetFunction.CountA(Sheet6.Range("A5:A60000")) = 0 Then Me.TABELDATA.RowSource = "" Call MsgBox("Data tidak ditemukan", vbInformation, "Cari Data") Else Me.TABELDATA.RowSource = "CARISISWA!A5:I" & iRow End If Me.TXTJUMLAH.Value = Me.TABELDATA.ListCount Exit Sub Salah: Call MsgBox("Maaf Data tidak ditemukan", vbInformation, "Cari Data") End Sub
Pencarian : Filter Copy Tanggal
Private Sub CariSetoran() On Error GoTo Salah Dim iRow As Long Dim JData As Long Dim CARI_DATA As Object Set CARI_DATA = Sheet4 Sheet3.Range("I4").Value = "Tanggal" Sheet3.Range("J4").Value = "Tanggal" Sheet3.Range("I5").Value = ">=" & Format(Me.TGLAWAL.Value, "MM/DD/YYYY") Sheet3.Range("J5").Value = "<=" & Format(Me.TGLAKHIR.Value, "MM/DD/YYYY") CARI_DATA.Range("A4").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= _ Sheet3.Range("I4:J5"), CopyToRange:=Sheet3.Range("A4:G4"), Unique:=False iRow = Sheet3.Range("A" & Rows.Count).End(xlUp).Row If Application.WorksheetFunction.CountA(Sheet3.Range("A5:A60000")) = 0 Then Me.TABELDATA.RowSource = "" Call MsgBox("Data tidak ditemukan", vbInformation, "Cari Data") Else Me.TABELDATA.RowSource = "CARISETORAN!A5:G" & iRow End If Exit Sub Salah: Call MsgBox("Maaf Data tidak ditemukan", vbInformation, "Cari Data")
Langganan:
Postingan (Atom)
Menghitung USIA Excel
=BYROW(D2:D100; LAMBDA(tanggal_lahir; IF(tanggal_lahir=""; ""; DATEDIF(tanggal_lahir; TODAY(); "y"...
-
Salin ke Clipboard Salin ke Clipboard Salin Tercopy! ...
-
=MOD(ROW();2)=1
-
Option Explicit Sub test() Dim fileku As String, lokasi As String lokasi = "D:\Raport Nafa\" fileku = Dir(lokasi & "*...