I need help
Please can someone help me devise and formula for the set of values below:

I am in need of a formula in Cell O4 for the following
100 in L4. 5 in N4. If L4 is less than or equal to 100 value to stay as N4. If L4 is greater than 100 but less than 500 O4 to show 80% of N4. If L4 is greater than 500 but less than 1000 O4 to show 60% of N4

Thanks in advance.

Johnny N Stars