Hi All
I was able to generate random numbers all the 4 sheets using one command button using below code. Any other suggestions to simply code.
Dim ab1 As Range
Dim xy As Integer
For Each ab1 In Range("b2:g26")
ab1.Offset(0, 0).Value = Application.WorksheetFunction.RandBetween(5, 99)
Next ab1
For Each ab1 In Sheets("FEB").Range("b2:g26")
ab1.Offset(0, 0).Value = Application.WorksheetFunction.RandBetween(5, 99)
Next ab1
For Each ab1 In Sheets("MAR").Range("b2:g26")
ab1.Offset(0, 0).Value = Application.WorksheetFunction.RandBetween(5, 99)
Next ab1
For Each ab1 In Sheets("APR").Range("b2:g26")
ab1.Offset(0, 0).Value = Application.WorksheetFunction.RandBetween(5, 99)
Next ab1
Bookmarks