Private Sub
Worksheet_SelectionChange(ByVal Target As Range)
Sheets("sheet1").Range("a1") =
Application.CountA(Range("B2:B20"))
No = 0
For NOMOR = 1 To Range("a1")
No = No + 1
Cells(No + 1, 1).Value = No
Next NOMOR
End Sub
Private Sub
Worksheet_SelectionChange(ByVal Target As Range)
[a2:a30].Formula = "=IF(B2<>0,COUNTA($B$2:B2),0)"
End Sub
RUMUS :
=IF(B2<>0;COUNTA($B$2:B2);0)
=IF(B2<>0;COUNTIF($B$2:B2;">0");0)
No comments:
Post a Comment