Rasgele Sayı Tablosu Oluştur - Microsoft Excel


Verilen satır sayısı ve sütun sayısı bilgisinden hareketle A1 hücresinden başlayarak rasgele sayı tablosu oluşturur.

Kod


Option Explicit

Sub RasgeleSayiGrubuOlustur()
    Dim satir As Integer
    Dim sutun As Integer
    Dim i, j, k As Integer
        
    satir = InputBox("Satır sayısını girin: ")
    sutun = InputBox("Sütun sayısını girin: ")
    
    For i = 1 To satir + 1
      For j = 1 To sutun
          Cells(i, j).Value = Int(Rnd * 1000 + 1)
      Next
    Next

End Sub

Etiketler
microsoft excel microsoft excel vba