? I believe question is incomplete. At any rate, that's more of mathematics question than Excel question.
If you need help with VBA. You'll need to explain to us non mathematician, underlying calculation and logic, along with constraints.
Sub blah()
For i = 1 To 10000
a = Rnd
b = Rnd
x = Application.Min(a, b)
Z = 1 - Application.Max(a, b)
y = 1 - x - Z
'Debug.Print x + y + Z, x, y, Z
If x + y > Z And x + Z > y And Z + y > x Then CanFormTriangle = CanFormTriangle + 1
TestCount = TestCount + 1
Next i
MsgBox CanFormTriangle & "/" & TestCount & " = a " & Format(CanFormTriangle / TestCount, "0.000%") & " chance of forming a triangle"
End Sub
Sub blah2()
Granularity = 1000
For i = 1 To Granularity - 2
a = i / Granularity
For j = i + 1 To Granularity - 1
b = j / Granularity
x = a
y = b - a
Z = 1 - b
'Debug.Print x + y + Z, x, y, Z
If x + y > Z And x + Z > y And Z + y > x Then CanFormTriangle = CanFormTriangle + 1
TestCount = TestCount + 1
Next j
Next i
MsgBox CanFormTriangle & "/" & TestCount & " = a " & Format(CanFormTriangle / TestCount, "0.000%") & " chance of forming a triangle"
End Sub