Hello Rashid,

If you have a formula in column AB that gives the correct result then why can't you simply use that one? ....or are you trying to get the same result by another method.....or without using some of those columns?

I think you could get the same result in column AB with this formula in AB2 copied down

=IF($N2="Y",(G2*8+MIN(G2,5)*4),5*$G2)*$B2/365