Highlighted
New Contributor

# formula to calculate notice period

Hi,

I am currently using the following formula to calculate notice period but the maximum years is 12 how can i add a clause to the formula to ensure the number calculated is no more than 12

=IF((AND(AA4<=5)),"1Month",AA4*1)

Thanks

5 Replies
Highlighted

# Re: formula to calculate notice period

This is the way your IF formula ought to look like

=IF(AA4<=5,"1Month",AA4*1)
Highlighted

# Re: formula to calculate notice period

Thank you for simplifying the formula.  Do you know how I can limit the answer to a maximum of 12 on the aa4*1?

Highlighted

# Re: formula to calculate notice period

Perhaps

``=IF(AA4<=5,"1Month",MIN(12,AA4*1)))``
Highlighted

# Re: formula to calculate notice period

Yes that worked perfectly thank you @Sergei Baklan

Highlighted