Our goal is to generate a random integer in the range 0 to 1 (because a single flip can result in 0 or 1 head):
RANDBETWEEN(0,1)
To simulate flipping three coins, each coin must be simulated and the results added together as follows:
=RANDBETWEEN(0,1) + RANDBETWEEN(0,1) + RANDBETWEEN(0,1)
1st Coin + 2nd Coin + 3rd Coin
The sum is the number of heads.