How to make a column number not exceed another column's

I have a column called "Days worked", which I get using:

=IF(NETWORKDAY([Start date]@row; TODAY()) < 0; 0; NETWORKDAY([Start date]@row; TODAY()))

This ensures it won't go below 0.

I want to also make sure it doesn't exceed the number in a column called "Duration".

I tried combining the aforementioned IF with :

IF(NETWORKDAY([Start date]@row; TODAY()) > Duration@row; Duration@row; NETWORKDAY([Start date]@row; TODAY()))

This doesn't work. Does anyone know how to write it properly?

Thank you in advance.

Best Answer

Answers