SOLVED

Need excel formula

%3CLINGO-SUB%20id%3D%22lingo-sub-2022531%22%20slang%3D%22en-US%22%3ENeed%20excel%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2022531%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3BIf%20%3CSTRONG%3EB5%3C%2FSTRONG%3E%20is%20%26lt%3B%3D%20to%20%3CSTRONG%3E%2222%22%3C%2FSTRONG%3E%20then%20%3CSTRONG%3EB1%2F2%2C%26nbsp%3B%3C%2FSTRONG%3EIf%26nbsp%3B%3CSTRONG%3EB5%26nbsp%3B%3C%2FSTRONG%3Eis%3CSTRONG%3E%20%26gt%3B%20to%20%2222%22%3C%2FSTRONG%3Ethen%26nbsp%3B%3CSTRONG%3EB1%20%3C%2FSTRONG%3Ewill%20remain%20same%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2022531%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2022589%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20excel%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2022589%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F914345%22%20target%3D%22_blank%22%3E%40Rushk0209%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DIF(B5%26lt%3B%3D22%2CB1%2F2%2CB1)%3C%2FP%3E%0A%3CP%3Eor%3C%2FP%3E%0A%3CP%3E%3DB1%2FIF(B5%26lt%3B%3D22%2C2%2C1)%3C%2FP%3E%0A%3CP%3Eor%3C%2FP%3E%0A%3CP%3E%3DB1%2F((B5%26lt%3B%3D22)%2B1)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2022957%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20excel%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2022957%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F914345%22%20target%3D%22_blank%22%3E%40Rushk0209%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDepends%20on%20where%20the%20result%20shall%20be.%20If%20in%20some%20other%20cell%2C%20when%20as%20suggested.%20If%20B1%20shall%20be%20changed%20depends%20on%20B5%2C%20when%20VBA.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

 If B5 is <= to "22" then B1/2, If B5 is > to "22"then B1 will remain same

 

3 Replies
best response confirmed by Rushk0209 (New Contributor)
Solution

@Rushk0209 

=IF(B5<=22,B1/2,B1)

or

=B1/IF(B5<=22,2,1)

or

=B1/((B5<=22)+1)

@Rushk0209 

Depends on where the result shall be. If in some other cell, when as suggested. If B1 shall be changed depends on B5, when VBA. 

Working.
Thanks..!