formula to calculate notice period

%3CLINGO-SUB%20id%3D%22lingo-sub-1253927%22%20slang%3D%22en-US%22%3Eformula%20to%20calculate%20notice%20period%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1253927%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20currently%20using%20the%20following%20formula%20to%20calculate%20notice%20period%20but%20the%20maximum%20years%20is%2012%20how%20can%20i%20add%20a%20clause%20to%20the%20formula%20to%20ensure%20the%20number%20calculated%20is%20no%20more%20than%2012%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIF((AND(AA4%26lt%3B%3D5))%2C%221Month%22%2CAA4*1)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1253927%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1254028%22%20slang%3D%22en-US%22%3ERe%3A%20formula%20to%20calculate%20notice%20period%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1254028%22%20slang%3D%22en-US%22%3EThis%20is%20the%20way%20your%20IF%20formula%20ought%20to%20look%20like%3CBR%20%2F%3E%3CBR%20%2F%3E%3DIF(AA4%26lt%3B%3D5%2C%221Month%22%2CAA4*1)%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1254638%22%20slang%3D%22en-US%22%3ERe%3A%20formula%20to%20calculate%20notice%20period%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1254638%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F421698%22%20target%3D%22_blank%22%3E%40Abiola1%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20simplifying%20the%20formula.%26nbsp%3B%20Do%20you%20know%20how%20I%20can%20limit%20the%20answer%20to%20a%20maximum%20of%2012%20on%20the%20aa4*1%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1256848%22%20slang%3D%22en-US%22%3ERe%3A%20formula%20to%20calculate%20notice%20period%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1256848%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F595410%22%20target%3D%22_blank%22%3E%40Kayletab%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPerhaps%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3DIF(AA4%26lt%3B%3D5%2C%221Month%22%2CMIN(12%2CAA4*1)))%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1256863%22%20slang%3D%22en-US%22%3ERe%3A%20formula%20to%20calculate%20notice%20period%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1256863%22%20slang%3D%22en-US%22%3E%3CP%3EYes%20that%20worked%20perfectly%20thank%20you%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1256901%22%20slang%3D%22en-US%22%3ERe%3A%20formula%20to%20calculate%20notice%20period%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1256901%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F595410%22%20target%3D%22_blank%22%3E%40Kayletab%3C%2FA%3E%26nbsp%3B%2C%20glad%20to%20help%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

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
This is the way your IF formula ought to look like

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

@Abiola1 

 

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

@Kayletab 

Perhaps

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

Yes that worked perfectly thank you @Sergei Baklan 

Highlighted

@Kayletab , glad to help