Expanded formula

Hi,

Can someone review this and commit it please? Thanks

 fintan