Cant find this formula

Good morning, I need to do a calculation but I can’t elaborate the formula, maybe you can help me!

If E65 is greater than A68 and E66 is less than B68, then paint E66 in E68, otherwise, paint E65 in E68.

I hope someone can resolve it, thank you.

Hello,

this one should do (type into E68):

=IF(AND(E65>A68;E66<B68);E66;E65)

Hope that helps.