Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Tampilkan postingan dengan label Baris. Tampilkan semua postingan
Tampilkan postingan dengan label Baris. Tampilkan semua postingan
Senin, 08 November 2021
Cell paling awal dan ujung cell yang terakhir
Baris awal di bawah judul (Baris kosong pertama di database)
aku = Sheet1.Cells(Rows.Count, 4).End(xlUp).Offset(1, 0).Row
Range("D" & aku).Select
Selasa, 26 Oktober 2021
Serba Awal
Sub test() 'mencari baris paling awal dari semuanya,hasilnya angka barisawal = Cells.Find(What:="*", searchdirection:=xlNext, _ searchorder:=xlByRows).Row kolomawal = Cells.Find(What:="*", searchdirection:=xlNext, _ searchorder:=xlByColumns).Column MsgBox "Baris awal " & barisawal & vbCrLf & "kolom awal " & kolomawal End Sub
Serba Akhir
Sub test()
'mencari baris yang terakhir dari total semuanya, hasil berupa angka
barisakhir = Cells.Find(What:="*", After:=Range("A1"), _
SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
MsgBox barisakhir
End Sub
-----------------------
Sub test()
'mencari baris yang terakhir, hasil berupa angka, kolom ke-4
barisakhirsatukolom = Cells(Rows.Count, 4).End(xlUp).Row
MsgBox barisakhirsatukolom
End Sub
-------------------
Sub test()
'mencari baris yang terakhir, dari beberapa kolom
barisakhirbeberapakolom = Range("B:D").Find(What:="*", After:=Range("B1"), _
SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
MsgBox barisakhirbeberapakolom
End Sub
-------------------------
Sub test()
'kolom akhir dari semua baris,keluar angka, hasilnya kolom ke-8
kolomakhir = Cells.Find(What:="*", After:=Range("A1"), _
SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column
MsgBox kolomakhir
End Sub
Senin, 25 Oktober 2021
Baris Akhir dan Kolom Akhir
Sub test() Dim jumlahbaris As Long Dim jumlahkolom As Long jumlahbaris = Cells(Rows.Count, 2).End(xlUp).Row jumlahkolom = Cells(2, Columns.Count).End(xlToLeft).Column MsgBox "jumlah baris adalah : " & jumlahbaris & vbCrLf & "Jumlah kolom : " & jumlahkolom, vbokonlny + vbInformation, _ "Info" End Sub
Langganan:
Postingan (Atom)
Menghitung USIA Excel
=BYROW(D2:D100; LAMBDA(tanggal_lahir; IF(tanggal_lahir=""; ""; DATEDIF(tanggal_lahir; TODAY(); "y"...
-
klik di sni
-
Option Explicit Sub cetaktabungansetoran() Dim rujukan As Range Dim b As Long Set rujukan = Sheets("CETAKTABUNGAN").Range(...
-
Option Explicit Private Sub CDMDDELETE_Click() Application.ScreenUpdating = False Me.TABELDATA.value = "" If Me.TXTNISN.valu...