Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub otodik()
- Dim mu As Double
- Dim szigma As Double
- Dim cella
- mu = 0.05
- szigma = 0.2
- Dim r As Range
- 1:
- Set r = Application.InputBox("Adjon meg egy négyzet alakú tartományt!", "Adjon meg egy négyzet alakú tartományt!", , , , , , 8)
- If r.Rows.Count <> r.Columns.Count Then
- GoTo 1
- End If
- Application.Volatile
- For Each cella In r
- cella.Clear
- cella.Value = mu + szigma * Application.WorksheetFunction.Norm_S_Inv(Rnd())
- If Abs(cella.Value - mu) > szigma And Abs(cella.Value - mu) < 2 * szigma Then
- cella.Interior.Color = vbRed
- End If
- Next
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement