If:

cell a1 = 10
cell a2 = 15
cell a3 = 20

I am trying to write the following where the value in cell a4 = 5:

if a4 is <=a1 and >=a3, 5, if < a1 10, and if >a3 0

Can someone help me write this statement?